Page 1 of 1

reversi tutorial: gameserver locked by configuration

Posted: 30 June 2020, 01:38
by G__
Hey folks. I am working through the reversi tutorial and successfully finished the part that displays the possible moves. The next part of the tutorial is to add player interaction, enabling the player to click to select a move and update the game state.

It behaves correctly when the non-active player tries to make a move--it properly tells that player it isn't their turn.

However, when the active player tries to click a move, I get the following error:

Code: Select all

Server syntax error:
Sorry, an unexpected error has occurred...

Gameserver is locked by configuration

#0 /var/tournoi/release/tournoi-200622-1731/www/include/APP_GameAction.inc.php(21): APP_GameAction->initGameTableObjects()
#1 /var/tournoi/release/tournoi-200622-1731/www/include/webActionCore.inc.php(128): APP_GameAction->__construct()
#2 /var/tournoi/release/tournoi-200622-1731/www/index.php(230): launchWebAction('reversi', 'action_reversi', 'playDisc', false, false, NULL, true, false)
#3 {main}
Couldn't find anything helpful searching through the forum for existing threads. Any ideas what's going on?

Thanks!

Re: reversi tutorial: gameserver locked by configuration

Posted: 02 July 2020, 13:56
by Maugrey
Hi, I had the same problem.

If you copy/past the code with no modification, you should have something like that :

Code: Select all

            if( this.checkAction( 'playDisc' ) )    // Check that this action is possible at this moment
            {            
                this.ajaxcall( "/reversi/reversi/playDisc.html", {
                    x:x,
                    y:y
                }, this, function( result ) {} );
            }
But, this only works if the name of your game is reversi.
The URL /reversi/reversi/playDisc.html won't work, because the name of your game is different. ANd your game can't access to the action of other games.

Try /mygamename/mygamename/playDisc.html with the name you gave to your name, in place of mygamename.