Context:
My states:
Whenver I transition to the ST_PUT_DOWN_SET state, the game crashes *only for the active player*. Other players show, as expected, "${actplayer} can put down a set", but on the active player I get:
and
I was searching a bit and this seems to be related to the arg method not returning an array, but that is not the case:
(the debug is just me testing that the method is actually called, and it is)
Now I have seen that the args is optional if not needed and removed it from the state, but the error persists.
To me this state should be fairly similar to the ST_PLAYER_TURN, which works fine...
I'm a bit lost to what is the actual problem here, could someone point out the probably obvious mistake I'm making? ^^'
My states:
Code: Select all
ST_PLAYER_TURN => [
"name" => "playerTurn",
"description" => clienttranslate('${actplayer} must choose an action'),
"descriptionmyturn" => clienttranslate('${you} must choose an action'),
"type" => "activeplayer",
"args" => "argPlayerTurn",
"possibleactions" => [
"actSurfTurf",
"actExchange",
"actYellowCard"
],
"transitions" => [ACT_SURF_TURF => ST_CHECK_CAN_PUT_DOWN_SET, ACT_EXCHANGE => ST_CHECK_CAN_PUT_DOWN_SET, ACT_YELLOW_CARD => ST_CHECK_CAN_PUT_DOWN_SET]
],
ST_CHECK_CAN_PUT_DOWN_SET => [
"name" => "checkCanPutDownSet",
"description" => '',
"type" => "game",
"action" => "stCheckCanPutDownSet",
"updateGameProgression" => false,
"transitions" => [ACT_ALLOW_PUT_DOWN_SET => ST_PUT_DOWN_SET, ACT_CANNOT_PUT_DOWN_SET => ST_NEXT_PLAYER]
],
ST_PUT_DOWN_SET => [
"name" => "putDownSet",
"description" => clienttranslate('${actplayer} can put down a set'),
"descriptionMyTurn" => clienttranslate('${you} can put down a set'),
"type" => "activeplayer",
"args" => "argPutDownSet",
"possibleactions" => [
"actPutDownSet",
"actPass"
],
"transitions" => [ACT_PUT_DOWN_SET => ST_NEXT_PLAYER, ACT_PASS => ST_NEXT_PLAYER]
],
ST_NEXT_PLAYER => [
"name" => "nextPlayer",
"description" => '',
"type" => "game",
"action" => "stNextPlayer",
"updateGameProgression" => true,
"transitions" => [ACT_END_GAME => ST_END_GAME, ACT_NEXT_PLAYER => ST_PLAYER_TURN]
],
Code: Select all
Invalid or missing substitution argument for log message: undefined: i is undefinedCode: Select all
During notification gameStateChange
t is undefined
Code: Select all
public function argPutDownSet(): array
{
$this->debug("AAABBB");
return [];
}
Now I have seen that the args is optional if not needed and removed it from the state, but the error persists.
To me this state should be fairly similar to the ST_PLAYER_TURN, which works fine...
I'm a bit lost to what is the actual problem here, could someone point out the probably obvious mistake I'm making? ^^'