Page 1 of 1
Server syntax error: This game has ended
Posted: 15 April 2013, 21:34
by tilalilalou
Hello,
When I try to play my first action, I have this error : "Server syntax error: This game has ended".
I can't see my mistake in my state machine or in my game setup, what is the reason ?
The database does not help me, I can't find any significations in "global" table, indexes are numbers so I cannot identify their meanings. None are set on 99 thought, so I believe my game is not in gameEnd state.
Thanks for the help !
Re: Server syntax error: This game has ended
Posted: 15 April 2013, 23:33
by Een
Hello,
You must be viewing a game that your player has quit (and so that has ended).
If you go back to the main site, then start another you should be fine.
Or does this happen each time you start a new game ?
Een
Re: Server syntax error: This game has ended
Posted: 16 April 2013, 08:13
by tilalilalou
Hi,
It happens all the time indeed. I'm using express game start, and I did not quit the game with any player.
Tilalilalou
Re: Server syntax error: This game has ended
Posted: 18 April 2013, 09:34
by tilalilalou
I'm still having the same error, my code is nearly finished, but I cannot test anything except first state.
Re: Server syntax error: This game has ended
Posted: 18 April 2013, 14:17
by tilalilalou
I finally identified my mistake :
this.ajaxcall("/reversi/reversi/placeTile.html"
Instead of :
this.ajaxcall("/splits/splits/placeTile.html"
That may be a good oppurtunity to improve the message to help identify this kind of mistake
Tilalilalou
Re: Server syntax error: This game has ended
Posted: 19 April 2013, 12:07
by Een
Ok, it makes senses, as in this case it would have been looking for a game of reversi with the same number as your game, and wouldn't have found it.
Thanks for posting the reason for this error as it could happen to others.
I have noted to try and improve the message if possible.
Een
Re: Server syntax error: This game has ended
Posted: 19 April 2013, 18:24
by tilalilalou
To prevent this kind of error, you could create a new method in ebg.core.gamegui :
Code: Select all
/**
* Call a game action.
* @param {string} actionName eg. "placeTile" for /splits/splits/placeTile.html
* @param {object} args see ajaxcall
* @param {function=} resultHandler see ajaxcall (optionnal)
* @param {function=} faultHandler see ajaxcall (optionnal)
*/
function actionCall(actionName, args, resultHandler, faultHandler)
{
this.checkAction(actionName);
this.ajaxcall(actionName, args, resultHandler, faultHandler);
}
That would even help to factorize every "checkAction"call.
Tilalilalou
PS: comments are based on
Google Closure Javascript annotations
Re: Server syntax error: This game has ended
Posted: 11 May 2013, 19:40
by garcia1968
I'm getting this same error, my gamestate did just change to 'endGame', but no final score box was shown and I can't find the same type error as was the case for tilalilalou.
Re: Server syntax error: This game has ended
Posted: 11 May 2013, 20:29
by Rudolf
Is it same problem? did you asked for step 99 (EndGame), or it was not asked?
Because, if your pb is that drop box is not shown, I had the same pb (a part of another) and Pikiou helped me to solve it like this:
adding a pre-step 98 called as my endgame process that launch the step 99 which is server endgame.
hope it will help.
Re: Server syntax error: This game has ended
Posted: 11 May 2013, 21:58
by garcia1968
Hey Rudolf,
Thanks for the suggestion.
I was asking for step 99 (endGame) which produced the error.
I looked at your earlier thread also
http://forum.boardgamearena.com/viewtop ... =12&t=3003
I may give that a try as a work-around fix later, hoping to for a simpler/direct fix without having to add an extra pre-EndGame state. Will report back later if still stuck and take that approach.