Page 1 of 1

Issue leaving a multiplayer state

Posted: 28 October 2013, 14:23
by eisen
Hi guys,

I'm having trouble leaving a multiplayer state. I'm using setPlayerNonMultiactive for each player with the transition name. But when all the players become non-active, I get the following message: 'Unexpected error: Unexpected final game state (10)'. State 10 is a game state where the code checks if the game needs to do another multiplayer round or move to the next phase of the game.

Any ideas what I might be doing wrong?

Best regards,
Eisen

Re: Issue leaving a multiplayer state

Posted: 28 October 2013, 17:54
by Een
Hello,

This usually happens when you get in a state for which there is no outgoing transition.
You get to your state 10, so going out of the multiactive state works, but your state 10 must have some trouble and not redirect to another state.
In your stCheckDraftEnd, you must be in a case when neither of the two conditions in your if/elseif matches, so you should have an else statement to catch this case.

Cheers,
Een

Re: Issue leaving a multiplayer state

Posted: 28 October 2013, 21:27
by eisen
Thank you Een, that was exactly the problem. I was counting how many players have selected a card during the draft round, but I don't need to do it. I was misinterpreting the error to mean that the game couldn't transition to state 10, when it was actually saying that the game couldn't end in state 10. Thanks again.