Page 1 of 1

clienttranslate Variables

Posted: 10 February 2013, 18:19
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 ?

Re: clienttranslate Variables

Posted: 11 February 2013, 17:51
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,

Re: clienttranslate Variables

Posted: 12 February 2013, 15:47
by Sandram
It works just fine !

Thank you.

Re: clienttranslate Variables

Posted: 08 November 2014, 11:32
by dhoom3
thanks for fixing it......