clienttranslate Variables

Game development with Board Game Arena Studio
Post Reply
Sandram
Posts: 4
Joined: 12 May 2011, 12:20

clienttranslate Variables

Post by Sandram »

Hi there,

In the states php file, i defined a state like this

Code: Select all

3 => array(
    		"name" => "playerMoveDisc",
    		"description" => clienttranslate('${actplayer} must select a destination'),
    		"descriptionmyturn" => clienttranslate('${you} must select a destination'),
    		"type" => "activeplayer",
		"args" => "argPlayerMoveDisc",
    		"possibleactions" => array( "moveDisc", "selectDisc"),
    		"transitions" => array( "moveDisc" => 4, "selectDisc" => 21, "zombiePass" => 4 )
    ),
An error occurs when i switch to this state : actPlayer is undefined, so is the $you variable.
Did I miss something in my game php file ?
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: clienttranslate Variables

Post by sourisdudesert »

Hello Sandram,

It could happened if no player is active. Usually it never happens, except if you don't call "activeNextPlayer" before going into your first "activePlayer" game state.

Did you still have this error ?

All the best,
Sandram
Posts: 4
Joined: 12 May 2011, 12:20

Re: clienttranslate Variables

Post by Sandram »

It works just fine !

Thank you.
Post Reply

Return to “Developers”