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.
ViewFrame * tvf;
...
function late_repeatedly_execute_always(){
...
tvf = Game.GetViewFrame(cChara.View, cChara.Loop, cChara.Frame);
...
}
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.
Hey, it seems I solved the error. It appears that view and loop number isn't updated in sync with frame.
ViewFrame * tvf;
int i_view;
int i_loop;
function repeatedly_execute_always(){
i_view = cChara.View;
i_loop = cChara.Loop;
}
...
function late_repeatedly_execute_always(){
...
tvf = Game.GetViewFrame(i_view, i_loop, cChara.Frame);
...
}