Issue leaving a multiplayer state

Game development with Board Game Arena Studio
Post Reply
eisen
Posts: 5
Joined: 25 August 2013, 22:53

Issue leaving a multiplayer state

Post 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
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: Issue leaving a multiplayer state

Post 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
eisen
Posts: 5
Joined: 25 August 2013, 22:53

Re: Issue leaving a multiplayer state

Post 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.
Post Reply

Return to “Developers”