Page 1 of 1

Error when launching game

Posted: 19 February 2025, 11:21
by CanonNi
Hi. I got an error when launching a game I'm working on:

Code: Select all

Uncaught (in promise) Error: undefinedWrong formatted data from gameserver 1 (method: createGame): JSON_ERROR_SYNTAX <br />
<b>Warning</b>:  Undefined array key "lock_screen_timestamp" in <b>/var/tournoi/release/tournoi-250218-1305-gs/www/game/module/table/table.game.php</b> on line <b>973</b><br />
{"status":"0","exception":"feException","error":"Fatal error during wildcards setup: Unknown gamestate label: lock_screen_timestamp (reference: GS1 19\/02 11:14:20)","expected":0,"code":100} (reference: GS0 19/02 11:14:20)
I don't have a line 973 or any "lock_screen_timestamp" in my code, and this error isn't mentioned in the Troubleshooting wiki page. Would appreciate it if someone could take a look, thanks.

Re: Error when launching game

Posted: 19 February 2025, 12:05
by thoun
Did you remove the call to initGameStateLabels ? If yes, just add back on the constructor

Code: Select all

$this->initGameStateLabels([])
and it should be fine.
It initialize your labels, but also BGA internal labels, like lock_screen_timestamp ;)

And in general, if something breaks, revert to your previous change, it should help you find what change triggered the issue.

Re: Error when launching game

Posted: 19 February 2025, 12:27
by CanonNi
Yup, that fixed it - I must have accidentally removed it earlier. Thanks a lot!