[SOLVED] Strange Behaviour between states after 'save'

Game development with Board Game Arena Studio
Post Reply
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

[SOLVED] Strange Behaviour between states after 'save'

Post by Rudolf »

After one of my state, I've got a "This move is not authorized now"..; even I can do all the things I want...
SO I try to debug using the 3 load and save... I save at very start of the game (nothing done) (1), after first action (2) and before the bug (3).
If I reload at (2) or (3) and continue, the message does not appear anymore.... If I reload at 1, ans I continue it makes it appear...
I don't understand why...
the possible action seems to be well described (in an array :) ) ...


A thing that I verified, if I reload before having the message for the first time, the message will happen...
also if I refresh before also...
But after having it... If I reload at save 2 or 3 ... it does not happen.

Have you had such a behaviour? What could be the difference in a reload ?
Last edited by Rudolf on 24 August 2015, 08:24, edited 1 time in total.
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Strange Behaviour between states after 'save' ans 'load'

Post by pikiou »

IMO the unauthorized move is an action you could do before save 2, and which for some reason the interface still allows to do after save 2.
Are you sure you disconnect all the event triggers you connected at the end of each 'playeractive' state?
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Strange Behaviour between states after 'save' ans 'load'

Post by Rudolf »

No... I disconnect nothing right now :) ... I thought to code it later ...

you mean, at each end of state, I must disconnect all connections to avoid this problem?
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Strange Behaviour between states after 'save' ans 'load'

Post by pikiou »

If there is a button on which you connected a trigger to send an action back to the server, then later on the same button you add another trigger for another action, both actions will be sent when someone interacts with this button.
So yes you have to disconnect the first trigger.
Last edited by pikiou on 24 August 2015, 10:53, edited 1 time in total.
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Strange Behaviour between states after 'save' ans 'load'

Post by Rudolf »

Thanks Pikiou!!!
Post Reply

Return to “Developers”