Quantcast
Channel: Active questions tagged game-maker - Stack Overflow
Viewing all articles
Browse latest Browse all 189

Sprite_index is not set

$
0
0

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.


Viewing all articles
Browse latest Browse all 189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>