DEBUGGING

Game development with Board Game Arena Studio
Post Reply
Scooby Rex
Posts: 1
Joined: 21 December 2013, 05:15

DEBUGGING

Post by Scooby Rex »

DEBUGGING: I keep getting errors. The errors I get are in the framework code. It is, of course, due to something in my code that is setting off errors in the framework code. I am positive I am not the only one who gets these errors. I was just wondering if someone can clue me in on what area of my code to look at that they think might be causing the error in the framework code. The current errors I am getting are:

Unexpected error: Wrong formatted data from BGA gameserver 1: Notice: Undefined offset: 0 in /var/tournoi/release/tournoi-140106-0923-gs/www/game/module/table/gamestate.game.php on line 753 Notice: Undefined offset: 0 in /var/tournoi/release/tournoi-140106-0923-gs/www/game/module/table/table.game.php on line 706 {"status":1,"data":true}

This is the error that pops up in red at the top of the screen right after I hit "Express Start"

My best guess is that a field in the player table is trying to be access that isn't there when it tries to access the database.
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: DEBUGGING

Post by pikiou »

You php code raised two notices. Handle the first one and the second might get fixed as well.
The first one is an undefined offset in the framework file gamestate.game.php. So it's either states.inc.php, $this->gamestate->nextState() or $this->gamestate->setPlayerNonMultiactive() related.
"Undefined offset: 0" means there is an array you should have populated in one of your states, or you tried to transition to a state with id id 0.

If you can't find it, send me your states.inc.php, your <gamename>.game.php and I'll have a look.
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: DEBUGGING

Post by sourisdudesert »

Hi Scooby,

My guess is: you didn't active a player, and entered an activestate. You must always make sure that the correct player has been made active before entering such a state.

Hope this helps.

Cheers,
Post Reply

Return to “Developers”