gameID sometimes ZERO when it should be always unique

gameID sometimes ZERO when it should be always unique

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

gameID sometimes ZERO when it should be always unique

Post by TradeMark »

gameID gives me string like "00000000000000000000000000000000" sometimes. (when should be random, like: c5075e482b42fdcc8a31c0f7b84cfe33)

I was hoping i could check unique replays easily by this value in the replaysite im doing, but its not possible since there is this flaw (so i need to generate own unique IDs then).

Oh and seems like those games are shorter than games with correct gameID value.

And i noticed winningAllyTeam is -1 always when gameID is zero.

Is that winningAllyTeam thing fixed in next release anyways? its kinda weird how it sometimes gives -1 even when game was ended and some team won.
Last edited by TradeMark on 04 Sep 2008, 21:33, edited 1 time in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: gameID sometimes ZERO when it should be always unique

Post by Tobi »

Do these two phenomenons *always* happen at the same time?
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: gameID sometimes ZERO when it should be always unique

Post by TradeMark »

Now I scanned through my ~1200 replays, here the new data:
when gameid is zero, winningAllyTeam = -1 (80%) or 0 (20%)

Also when winningAllyTeam is zero (and gameid is zero), the filesize is really small: 1028-1542 bytes. And when its -1 filesize is 1185-89200 bytes.

Edit: seems like all those games with gameid = zero havent even started at all.

Edit 2: yeah that must be it.

Maybe put winningAllyTeam into -2 when game wasnt started at all? then its easy to filter games which are rubbish.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: gameID sometimes ZERO when it should be always unique

Post by TradeMark »

can anyone verificate what makes this zero gameID ? so i can continue programming knowing what im doing...
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: gameID sometimes ZERO when it should be always unique

Post by Kloot »

The game ID is not generated or sent until the game actually
starts, if a player exits before everybody has readied up then
it won't be initialized (ie. remain 0) for that player's demo and
winningAllyTeam will be -1. Both cases are expected behavior.
Post Reply

Return to “Help & Bugs”