Boolean or 0/1?

Boolean or 0/1?

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
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Boolean or 0/1?

Post by LEDZ »

I've witnessed Déjà vu with this:

Code: Select all

Spring.GetPlayerRoster

 ( [number sortType] ) ->
   nil | playerTable = {
           [1] = {
             string  name,
             number  playerID,
             number  teamID,
             number  allyTeamID,
             boolean spectator,
             number  cpuUsage,
             number  pingTime
           },
           etc...
         }
The 'boolean' spectator is actually stored as 1 or 0 (true or false).
Is there a reason? I'm not sure if I should edit the wiki or not.
Any thoughts?

http://springrts.com/wiki/Lua_UnsyncedRead
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Boolean or 0/1?

Post by jK »

LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: Boolean or 0/1?

Post by LEDZ »

Nice one. Everyone will have to update widgets for next spring version then yes?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Boolean or 0/1?

Post by knorke »

Everyone will have to update widgets for next spring version then yes?
i think it will continue to work as before
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Boolean or 0/1?

Post by Silentwings »

Seems not, at least red console needs to be changed.
Post Reply

Return to “Help & Bugs”