B
bigweight
Guest
Hello guys, I'm having a bit of trubles with my state machines, in particular I have this code:
the problem is that state does not turn red and the game does not even recognize the state variable when I go to the state event and I write:
I get the error that he doesn't know what ''idle'' is basically...what's wrong with this enum?
Code:
enum state {
idle,
Chase,
Investigate,
Search,
}
Cstate = state.idle;
the problem is that state does not turn red and the game does not even recognize the state variable when I go to the state event and I write:
Code:
switch (state) {
case idle:
scrIdle()
break;
case Chase:
scrChase();
break;
case Investigate:
scrInvestigate();
break;
case Search:
scrSearch();
break;
}