Page 2 of 3
Re: I cannot figure out zombieTurn [SOLVED]
Posted: 25 September 2021, 11:23
by JonChambers
robinzig wrote: ↑25 September 2021, 09:18
I'm not sure I follow. I got the impression that you had tried to implement zombieTurn and the game had started crashing with that sadly uninformative error while you were trying to test it. Since you have proved that the zombieTurn method isn't even getting looked at, this shows that something else must be wrong - so I'm asking what other code you have changed since the game last worked.
I suppose another possibility is that there's been this bug for a long time and whatever you are doing now is triggering it for the first time. But without any details of either code or what you are/were doing that's triggered this problem then it's impossible to help.
Forgive me if this is over-clarifying, but the game works perfectly, provided no one ever quits the game or gets booted from it. (Or spectates it, but that's another can of worms.)
It ran perfectly just before I implemented the zombie turn. It continues to run perfectly after I implemented the zombie turn, provided no one ever quits or gets booted, or spectates.
Re: I cannot figure out zombieTurn
Posted: 25 September 2021, 11:42
by robinzig
JonChambers wrote: ↑25 September 2021, 11:23
robinzig wrote: ↑25 September 2021, 09:18
I'm not sure I follow. I got the impression that you had tried to implement zombieTurn and the game had started crashing with that sadly uninformative error while you were trying to test it. Since you have proved that the zombieTurn method isn't even getting looked at, this shows that something else must be wrong - so I'm asking what other code you have changed since the game last worked.
I suppose another possibility is that there's been this bug for a long time and whatever you are doing now is triggering it for the first time. But without any details of either code or what you are/were doing that's triggered this problem then it's impossible to help.
Forgive me if this is over-clarifying, but the game works perfectly, provided no one ever quits the game or gets booted from it. (Or spectates it, but that's another can of worms.)
It ran perfectly just before I implemented the zombie turn. It continues to run perfectly after I implemented the zombie turn, provided no one ever quits or gets booted, or spectates.
OK thanks for clarifying. That's weird, sorry I don't have anything to contribute now (I'm about to go out) but hope you get it sorted.
Re: I cannot figure out zombieTurn
Posted: 25 September 2021, 23:46
by JonChambers
Okay, how do I test the three example games?
If I figure out what a zombie turn is supposed to look like, then break it piece by piece, as soon as I get the same error I can do whatever I just did backwards?
Re: I cannot figure out zombieTurn
Posted: 26 September 2021, 08:48
by JonChambers
Another minor update:
I was thinking maybe the function above was missing a "}", but no.
Elsewhere I called
The code returned exactly as I'd expect. So... it's not that.
The function is definitely callable, but I'm almost certain it's not being called. (Or if it is being called, somehow every single different thing I put in is now returning exactly the same error, which is unlikely given this behaviour doesn't happen when it's called internally.)
Re: I cannot figure out zombieTurn
Posted: 26 September 2021, 14:39
by Benoit314
Did you eliminate the player somewhere?
Eliminated players cannot have zombie turns.
Re: I cannot figure out zombieTurn
Posted: 27 September 2021, 00:20
by JonChambers
Benoit314 wrote: ↑26 September 2021, 14:39
Did you eliminate the player somewhere?
Eliminated players cannot have zombie turns.
Good guess, but no.
I am impressed though. I've run out of explanations that would fit this error exactly, and that definitely would have explained everything. Just the little snag that I haven't used any elimination functions anywhere in my code. But otherwise a great guess.
Re: I cannot figure out zombieTurn
Posted: 27 September 2021, 03:26
by Victoria_La
Sorry I cannot understand what was original problem? Were you testing zombie turn or error start happening in the middle of nowwhere?
Was it coming from production or on studio?
Basically Not logged means user is not logged in, which means the player in question does not have web client open to process requests
or could be even spectator or player id some sort of bad string/number.
In this case it is in the middle of calling skipPlayersOutOfTurn - means that somebody run out of time. So did you force the time to be run out in this case?
Re: I cannot figure out zombieTurn
Posted: 27 September 2021, 06:56
by JonChambers
Victoria_La wrote: ↑27 September 2021, 03:26Were you testing zombie turn or error start happening in the middle of nowwhere?
Testing zombie turn
Victoria_La wrote: ↑27 September 2021, 03:26Was it coming from production or on studio?
Studio
Victoria_La wrote: ↑27 September 2021, 03:26So did you force the time to be run out in this case?
I tried that, I also tried quitting as one of the players. Both methods produced exactly the same error message. I only tested for 2 players though, but if I can't get that right, no sense testing the rest.
Anything else I can clarify further? This bug is driving me insane, and I'm sure it's something stupid like a punctuation mark missing or something spelled wrong.
I made sure to copy my examples directly from the code so any misspellings will also be reproduced.
Re: I cannot figure out zombieTurn
Posted: 27 September 2021, 09:57
by Een
This "not logged" error usually occurs when you are using "getCurrentUser" in a place where code is triggered by server side call instead of a user browser request (this happens for the setup, and also for a zombie, since the player has left) as there is no current user in that case by definition.
I would advise to check your code to make sure that you use "getActiveUser" and not "getCurrentUser", except in places where "getCurrentUser" is absolutely needed (and always triggered by a player request).
Re: I cannot figure out zombieTurn
Posted: 27 September 2021, 11:03
by JonChambers
Een wrote: ↑27 September 2021, 09:57
This "not logged" error usually occurs when you are using "getCurrentUser" in a place where code is triggered by server side call instead of a user browser request (this happens for the setup, and also for a zombie, since the player has left) as there is no current user in that case by definition.
I would advise to check your code to make sure that you use "getActiveUser" and not "getCurrentUser", except in places where "getCurrentUser" is absolutely needed (and always triggered by a player request).
But... Zombie mode was completely blank. I commented out everything. It wasn't calling anything at all. It was just a long comment.
I also tested it with a "throw new BgaSystemException" and I couldn't get it to throw.
Where could I possibly put "getCurrentUser" that could be triggered by a completely blank zombieTurn?