Error: It is not your turn

Game development with Board Game Arena Studio
Post Reply
David Kühn
Posts: 10
Joined: 15 June 2024, 16:43

Error: It is not your turn

Post by David Kühn »

I am working on a game right now (Kingscraft) and I am doing good progress. I think I am 2/3 finsheid.
But now I have a weird situation, I am having trouble solving, because the error is not coming from the code, but the BGA framework.

The game isn´t played clockwise, but using action-selection cards, that then create a trun-order for the round. I have a "AllPlayersMultiactive"-State, where Players select their "Action" for the round. After that, the selected Actions are brought into a player-order and the first Player in that order is set as active player. The weird thing is now: Somethimes, when a player selects an action, after other players have selected theirs, it will throw a visual error "It is not your turn" and nothing happens. But in the "AllPlayersMultiactive"-state all players are active. So it is definitly the players turn. And I checked, the player is offially "active" at this moment. And sometimes it works as it should. It is inconsistent and happens in some other random moments as well. I don´t understand what is going on here. Do you have any idea?

(I already found, that this error is connected to the "Check Action"-Function and that it triggers, if the player is indeed not active. But this is not the case here)

Thank you so much for your help. :-)
User avatar
nicotacotac
Posts: 73
Joined: 20 March 2020, 13:42

Re: Error: It is not your turn

Post by nicotacotac »

Are you sure that your you don't have activate player functions somewhere that gets triggered by error then the actual action happening?
If it's the case, this player activation won't be visible and the checkAction will fail, this reverting the complete process (the reason why you don't see the player deactivation/reactivation)

Or maybe it's happening for the last player selecting the card and it's in your "state change" to an "active player" one that there is an error in activating the "good" one?

Definitely check around the player activation;)
David Kühn
Posts: 10
Joined: 15 June 2024, 16:43

Re: Error: It is not your turn

Post by David Kühn »

nicotacotac wrote: 25 August 2024, 15:08 Definitely check around the player activation;)
Thank you very much for the input. :-) I will look into this.

Alone the info, that if "checkAction" would fail, it would revert back the whole process, is very helpful. Because so far I didn´t realize, the error could be "later" than the state I am looking at at the moment.
Post Reply

Return to “Developers”