Server syntax error: This game has ended

Game development with Board Game Arena Studio
Post Reply
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Server syntax error: This game has ended

Post 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 !
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: Server syntax error: This game has ended

Post 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
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Re: Server syntax error: This game has ended

Post 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
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Re: Server syntax error: This game has ended

Post by tilalilalou »

I'm still having the same error, my code is nearly finished, but I cannot test anything except first state.
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Re: Server syntax error: This game has ended

Post 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
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: Server syntax error: This game has ended

Post 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
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Re: Server syntax error: This game has ended

Post 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
User avatar
garcia1968
Posts: 24
Joined: 03 April 2013, 16:03

Re: Server syntax error: This game has ended

Post 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.
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Server syntax error: This game has ended

Post 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.
User avatar
garcia1968
Posts: 24
Joined: 03 April 2013, 16:03

Re: Server syntax error: This game has ended

Post 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.
Post Reply

Return to “Developers”