Error starting game (Reversi tutorial)

Game development with Board Game Arena Studio
Post Reply
User avatar
Musmuris
Posts: 3
Joined: 19 April 2020, 19:52

Error starting game (Reversi tutorial)

Post by Musmuris »

Hi,
I've been following the Reversi Tutorial, and have got to the part where the updates to the states file happen (The game state machine on https://en.doc.boardgamearena.com/Tutorial_reversi )

But once uploading that file and trying to start a game I get the following errors

Code: Select all

Unexpected error: Propagating error from GS 1 (method: createGame): BGA service error (1.studio.boardgamearena.com 05/06 11:31:22)         10:31 AM
Unexpected error: Invalid player number for this game: 1         10:31 AM
even though I get a message saying "username1" has joined (as well as username0 I'm logged in as)

If I try and accept it then gives

Code: Select all

Unexpected error: Wrong table status (init): should be 'setup'     
So I've clearly made a mistake somewhere I even tried copying the file from the finished example but now I can't it work at all!

I don't know where to start on debugging this?
User avatar
Badguizmo
Posts: 76
Joined: 11 October 2020, 14:27

Re: Error starting game (Reversi tutorial)

Post by Badguizmo »

Hello.

I can't see your project in the project list but as I can see from the tutorial, if you copied/pasted the "states.inc.php" as is I think that

Code: Select all

<?php
is missing on top of the file.

In the troubleshooting section you have different possibilities for this error https://en.doc.boardgamearena.com/Troub ... vice_error :
  • You may have syntax error in your dbmodel.sql.
  • Or, you may be calling self::initStat() for a statistic that does not exist. Check the statistic name, and make sure you clicked "Reload statistics configuration" button in the admin console after making changes to stats.inc.php
  • Or you may not have your states.inc.php set up correctly.
Let us know if it solves your problem.
Official BGA developper newb :oops:
User avatar
Musmuris
Posts: 3
Joined: 19 April 2020, 19:52

Re: Error starting game (Reversi tutorial)

Post by Musmuris »

Thanks - it wasn't that but it got me looking at the right place. It had been a few weeks since I last got a chance to look at this. I think what happened was I had another error and, in trying to fix that, was over zealous in copying files from the examples - and had copied the entire .game.php complete with wrong class name and game name which caused that error.

Now to try and find the original one, which is where creating a game then "express start" says "Game is about to start" and then just seem to hang, doesn't start and then eventually shows it didn't really. So I'll start back from there and see what goes wrong and maybe start a new thread instead!
User avatar
Musmuris
Posts: 3
Joined: 19 April 2020, 19:52

Re: Error starting game (Reversi tutorial)

Post by Musmuris »

Ok - really silly error. Somehow in the States file, the first state (setup) had a transition to 99, endgame. I have no idea how I managed to get that in there but fixing that means it's now working!
Post Reply

Return to “Developers”