label "this is not your turn"

Game development with Board Game Arena Studio
Post Reply
User avatar
gaby528
Posts: 10
Joined: 22 April 2014, 16:48

label "this is not your turn"

Post by gaby528 »

Hello, in the game "Hearts", when we play a card and we are not allowed to, there is an error message "This is not your turn".
I cannot reproduce it for my game (KQJ) now, and when I look at the code of Hearts, I don't see where this error message comes from, and thus I don't know how to make it appear in my game.

In javascript, I use exactly the same code (which returns false) :
if( this.checkAction( 'playCard', true ) )
{
...

Do you you have any idea please ?


Thanks in advance for your help
User avatar
Quinarbre
Posts: 140
Joined: 15 December 2013, 23:26

Re: label "this is not your turn"

Post by Quinarbre »

You don't need to code it, it's displayed automatically every time a non-active player tries to do an action.

If it does not appear for your game, it may be because you don't manage active players correctly, or because you disconnect every possible action when a player is not active (which is perfectly ok and saves some useless server calls).
Post Reply

Return to “Developers”