Page 1 of 1

[SOLVED] Strange Behaviour between states after 'save'

Posted: 23 August 2015, 21:33
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 ?

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

Posted: 23 August 2015, 22:52
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?

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

Posted: 24 August 2015, 00:03
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?

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

Posted: 24 August 2015, 01:31
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.

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

Posted: 24 August 2015, 08:24
by Rudolf
Thanks Pikiou!!!