I do one thing it runs fine. I try it again, it crashes. what's happening?
I am trying to use for the first time a finite state machine in my game. The whole reason of making the game is to use a FSM. So, I have two states, STATE_MAIN_MENU and STATE_EXIT.
I have my abstract class, two derived classes for the two states and all. I have already done a similar console application and everything works fine, but here when I am getting from main menu to exit the game crashes, but not all the times. It runs fine for 2-3 times (deletes currentState instance of State_Main_Menu and then currentState = new State_Exit()). The thing is that I put a cout at the constructor of State_Exit and it does construct the class. But then when a function of class is about to run it crushes.
I can't explain it any better, I am attaching the code if anyone could help me I'd appreciate it, because I am getting crazy here!
Thanks in advance!
parinho7Member Since 07 Jul 2009
Offline Last Active May 12 2013 03:40 PM
- Group Members
- Active Posts 9
- Profile Views 908
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown