Author Topic: [SOLVED] Error: GetGameParameter: invalid frame specified  (Read 337 times)

Hey, I have a code as below, my character cChara is correctly shown in screen. But SOMETIMES, I get an error on the line that has Game.GetViewFrame, stating Error: GetGameParameter: invalid frame specified.

Code: Adventure Game Studio
  1. ViewFrame * tvf;
  2.  
  3. ...
  4. function late_repeatedly_execute_always(){
  5.   ...
  6.   tvf = Game.GetViewFrame(cChara.View, cChara.Loop, cChara.Frame);
  7.   ...
  8. }
  9.  

The only thing I gathered is it happens when the character is walking to some direction and I click to force him walk down, and my walking down (and up) animation has one less frame then the walking right and left.
« Last Edit: 10 Dec 2017, 19:40 by eri0o »

Re: Error: GetGameParameter: invalid frame specified
« Reply #1 on: 10 Dec 2017, 14:17 »
Hey, it seems I solved the error. It appears that view and loop number isn't updated in sync with frame.

Code: Adventure Game Studio
  1. ViewFrame * tvf;
  2. int i_view;
  3. int i_loop;
  4.  
  5. function repeatedly_execute_always(){
  6.   i_view = cChara.View;
  7.   i_loop = cChara.Loop;
  8. }
  9.  
  10. ...
  11. function late_repeatedly_execute_always(){
  12.   ...
  13.   tvf = Game.GetViewFrame(i_view, i_loop, cChara.Frame);
  14.   ...
  15. }
  16.