I'm following a YouTube tutorial on a fighting game. Facing an error:Var <unknown_object>.sprite_index not set.The error was here:
if (sprite_index != sprKill_foward){ sprite_index = sprKill_foward; image_index = 0;}codes for the object:
switch (state){ case 0: //< idle UpdateMoveIdle(); break; case 1: //< move fwd UpdateMoveFwd(); break; case 2: //< move back UpdateMoveBack(); break; default: show_debug_message("Error! Unknown state: " + string(state) +" Maybe you added a state but haven't updated the Update method."); break;}if (nextState != state){ //change the state state = nextState; //execute the start function for the new state switch (state){ case 0: //< idle StartIdle(); break; case 1: //< move fwd StartMoveFwd(); break; case 2: //< move back StartMoveBack(); break; default: show_debug_message("Error! Unknown state: " + string(state) +" Maybe you added a state but haven't updated the Start method."); break; }}I tried checking every syntax error and reviewing the tutorial but I can't identify the error.