Hi!
I have an "issue" with log notification.
Here is my code: (with 3 notifications)
In the log, I can see them in the right order and everything works fine:
first: Nobody claims ${TileId}
second: ${player_name} pick a tile from the Great Wall
third: ${You} pick ${TileId}
But when I refresh the page, the order of logs is modified:
first: ${You} pick ${TileId}
second: Nobody claims ${TileId}
third: ${player_name} pick a tile from the Great Wall
The self::notifyPlayer displays before the self::notifyAllPlayers...
maybe I've done something wrong.
Thanks for your help!
I have an "issue" with log notification.
Here is my code: (with 3 notifications)
Code: Select all
self::notifyAllPlayers( "noClaimer", clienttranslate( 'Nobody claims ${TileId}.' ), array(
'TileId' => $tiletoclaim['id'],
'tile_type' => $tiletoclaim['type'],
'tile_value' => $tiletoclaim['type_arg'],
) );
self::notifyAllPlayers('pickTile', clienttranslate( '${player_name} pick a tile from the Great Wall.' ), array (
'deck_from'=> 'greatwall',
'player_id' => $player_id,
'player_name' => self::getActivePlayerName(),
'tile' => $newTile ));
self::notifyPlayer( $player_id, 'blank', clienttranslate('${You} pick ${TileId}'), array(
"You" => "You",
"TileId" => $newTile['id'],
) );first: Nobody claims ${TileId}
second: ${player_name} pick a tile from the Great Wall
third: ${You} pick ${TileId}
But when I refresh the page, the order of logs is modified:
first: ${You} pick ${TileId}
second: Nobody claims ${TileId}
third: ${player_name} pick a tile from the Great Wall
The self::notifyPlayer displays before the self::notifyAllPlayers...
maybe I've done something wrong.
Thanks for your help!