Page 1 of 1

Game not starting

Posted: 05 June 2020, 15:33
by adela82
I don't know what to do. I'm developing Awkward Guests, and the game doesn't start, and I can't see the error because the page loads the box themed previous to the game but stops, with no message.

In fact, in table settings, I can't change the number of players despite I have from 3 to 8 players in gameinfos, and I reloaded it several times... I don't know what do next.

The project name is awkwardguests.

Thanks in advance

Re: Game not starting

Posted: 05 June 2020, 16:03
by RicardoRix
Normally, F12 will help to show you in the developer console, it will be something in the JS.
but your game doesn't show anything meaningful apart from your JSON cannot be parsed, which usually means that the general formatting is wrong.

You've missed a curly bracket off the end of function or if statement, or a ',' after a function definition, or you've screwed something in the define at the top.
Try using this:
https://esprima.org/demo/validate.html

Re: Game not starting

Posted: 06 June 2020, 10:52
by ExtraPaul
I had this problem when there was an syntax error in dbmodel.sql : no SQL tables are created and the game stops without errors.

Re: Game not starting

Posted: 07 June 2020, 10:02
by adela82
I use the Developer tools but shows no errors...

https://studio.boardgamearena.com/1/awk ... ble=154078

Check this situation, if you can see a thing!

On the other hand, I still don't know why the gameinfos doesn't load the number of players properly

Re: Game not starting

Posted: 07 June 2020, 10:58
by DrKarotte
I created a table and can set players from 3-8.

Starting lets the game freeze immediately, and the console just shows 1 entry. Seems that the game does not even reach the client.

Re: Game not starting

Posted: 07 June 2020, 11:05
by RicardoRix
Sorry that JSON error I get is because of my adblocker :oops: - same for my games.

All your DB tables are created, but there are no rows in references, solution or clues.

but yes the F12 console does not even show the 'constructor log'.

I checked all the files for syntax errors and they all passed.

Can you add var_dump('here'); (possibly add die(); afterwards) in the game.php see if anything gets run at all.

Maybe the best place to start are the changes you made recently and rewind those until the game loads again.

Got this from the log:
07/06 11:59:20 [info] [T150278] [2308257/RicardoRix0] 0.10800361633301 SELECT player_id,player_enter_game FROM player WHERE player_id='2308257'0
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.2281665802002 SELECT player_id, player_name name, player_color color, player_no, player_can_resolve can_resolve FROM player0
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.15091896057129 SELECT * FROM tracking_sheet WHERE player_id = 23082570
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.18119812011719 SELECT card_id id, card_type type, card_type_arg type_arg, card_location location, card_location_arg location_arg FROM clues WHERE card_location='hand' AND card_location_arg='2308257' 0
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.11610984802246 SELECT card_id id, card_type type, card_type_arg type_arg, card_location location, card_location_arg location_arg FROM clues WHERE card_location='common' 0
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.19598007202148 SELECT card_location, COUNT( card_id ) cnt FROM clues GROUP BY card_location 0
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.14686584472656 SELECT card_location_arg, COUNT( card_id ) cnt FROM clues WHERE card_location='hand' GROUP BY card_location_arg 0
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.090837478637695 SELECT count(*) as count FROM player WHERE player_zombie = 10
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 47.671794891357 UPDATE global SET global_value='50' WHERE global_id='11' 0
07/06 11:59:21 [info] [T150278] [2308257/RicardoRix0] 0.16498565673828 SELECT COALESCE( MAX( gamelog_packet_id ), 0 ) last_packet_id,

Re: Game not starting

Posted: 07 June 2020, 11:19
by RicardoRix
This looks the most ominous:

Code: Select all

07/06 11:38:14 [error] [T154078] [2308257/RicardoRix0] Unexpected exception: Unable to find table database (1): ebd_awkwardguests_154078 (BGA service error 1591522694)#
#0 /var/tournoi/release/tournoi-200603-1012-gs/www/include/utilities.inc.php(623): APP_DbObject::DbSelect('ebd_awkwardgues...')#
#1 /var/tournoi/release/tournoi-200603-1012-gs/www/include/APP_GameAction.inc.php(38): mysql_select_db('ebd_awkwardgues...')#
#2 /var/tournoi/release/tournoi-200603-1012-gs/www/include/APP_GameAction.inc.php(21): APP_GameAction->initGameTableObjects()#
#3 /var/tournoi/release/tournoi-200603-1012-gs/www/include/webActionCore.inc.php(128): APP_GameAction->__construct()#
#4 /var/tournoi/release/tournoi-200603-1012-gs/www/index.php(230): launchWebAction('awkwardguests', 'action_awkwardg...', '__default', false, false, NULL, true, false)#
Something is working:

Code: Select all

07/06 12:24:39 [info] [M] [2308257/RicardoRix0] /1/awkwardguests?table=1502780
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.19693374633789 SELECT global_id, global_value FROM global WHERE 1 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.08702278137207 SELECT player_id, player_beginner FROM player0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.14281272888184 SELECT player_id, player_name, player_no, player_avatar, player_color, player_canal, (player_id='2308257') player_is_admin, player_zombie, player_eliminated, player_next_notif_no, player_enter_game, player_ai, HEX( player_beginner ) player_beginner FROM player WHERE 1 ORDER BY player_no 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] setTable0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.093936920166016 SELECT global_id, global_value FROM global WHERE 1 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.10204315185547 SELECT player_id, player_remaining_reflexion_time,
UNIX_TIMESTAMP( player_start_reflexion_time ) start_reflexion_time, UNIX_TIMESTAMP( NOW() ) now_time
FROM player 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] Complete reinitialization of board game0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] DB commit: action validate0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] Generate content of game view0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] setTable0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.10991096496582 SELECT global_id, global_value FROM global WHERE 1 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.10108947753906 SELECT player_id, player_remaining_reflexion_time,
UNIX_TIMESTAMP( player_start_reflexion_time ) start_reflexion_time, UNIX_TIMESTAMP( NOW() ) now_time
FROM player 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.10585784912109 SELECT player_id,player_enter_game FROM player WHERE player_id='2308257'0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.23484230041504 SELECT player_id, player_name name, player_color color, player_no, player_can_resolve can_resolve FROM player0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.14686584472656 SELECT * FROM tracking_sheet WHERE player_id = 23082570
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.18095970153809 SELECT card_id id, card_type type, card_type_arg type_arg, card_location location, card_location_arg location_arg FROM clues WHERE card_location='hand' AND card_location_arg='2308257' 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.11992454528809 SELECT card_id id, card_type type, card_type_arg type_arg, card_location location, card_location_arg location_arg FROM clues WHERE card_location='common' 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.19311904907227 SELECT card_location, COUNT( card_id ) cnt FROM clues GROUP BY card_location 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.14781951904297 SELECT card_location_arg, COUNT( card_id ) cnt FROM clues WHERE card_location='hand' GROUP BY card_location_arg 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.09608268737793 SELECT count(*) as count FROM player WHERE player_zombie = 10
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 2.6581287384033 UPDATE global SET global_value='50' WHERE global_id='11' 0
07/06 12:24:40 [info] [T150278] [2308257/RicardoRix0] 0.15616416931152 SELECT COALESCE( MAX( gamelog_packet_id ), 0 ) last_packet_id,
COALESCE( MAX( gamelog_move_id ), 0 ) move_nbr
FROM gamelog
WHERE gamelog_player IS NULL OR gamelog_player='2308257'0
07/06 12:24:40 [notice] [T150278] [2308257/RicardoRix0] OK-0 436 d5 c0 e350 m0 I225 A1 V205 T4 /1/awkwardguests?table=150278
Pure guess, but that 50 into global 11, is the game progression being set to 50. If this is the last thing that happens then it's perhaps one of your game actions.

I think you're only allowed a default if there is only 1 option:
"transitions" => array("" => 45, "zombiePass" => 2)

You have a double ;;
$this->cluesDeck->moveCards($cards, "offer", $player_id);;

Re: Game not starting

Posted: 14 June 2020, 01:18
by adela82
Thanks! Where do you see those logs?

BTW, It keeps saying to me "Can't start game with less players" every time I try to change the number of players, no matter if I change the minimum or maximum, and no matter if plus or minus... I don't know why!

Re: Game not starting

Posted: 14 June 2020, 01:30
by RicardoRix
There are some buttons at the bottom of the page. If you can't get to them because the game doesn't load, then instead load a different game and you can then hack the url to suit your game/table id. Someone mentioned that you could bookmark the link and then just hack the table id.