No, the confusing thing is that it would only return the nil | teamID in pre 0.82.
In post 0.82 it would return neither. Well, actually, it probably still return a nil for skirmishAIID when the teamID is bad. But err, I would return nil | skirmishAIID, not nil | teamID. Or better said, it pre 0.82 it would return teamID, where (returned) teamID is nil if (provided) teamID is right wrong. And in post 0.82 it would return skirmishAIID, where skirmishAIID is nil if teamID is wrong. But then all the other returned value would be nil as well, woudln't they? And why the wiki would only mention it for the first? Or is the nil | a, b, c intended to be understood as nil | (a, b, c) instead of (nil | a), b, c ?
What I mean is:
Pre 0.82, Bad TeamID provided: return nil
Pre 0.82, Correct TeamID provided: return teamID, skirmishAIID, name, hostingPlayerID, shortName, version, options
Post 0.82, Bad TeamID provided: return nil
Post 0.82, Correct TeamID provided: return skirmishAIID, name, hostingPlayerID, shortName, version, options
The wiki was ambigious because it made you think the new version returned nil where the old returned teamID.
A better explanation would have been:
Code: Select all
Spring.GetAIInfo
( number teamID ) ->
nil | (if bad teamID)
[number teamID,] (bug in pre 0.82)
number skirmishAIID,
string name,
number hostingPlayerID,
string shortName, (synced => "SYNCED_NOSHORTNAME"; non-local => "UNKNOWN")
string version, (synced => "SYNCED_NOVERSION"; non-local => "UNKNOWN")
table options (synced & non-local => empty-table)
Smoth wrote:fixing things is good
I disagree: Fixing things is not good when it does not fix anything, does not do any good, doesn't help with anything, and break interfaces.
The extra teamID harmed no one and costed nothing. Its removal harmed mods, harmed widgets, and cost Lua coders lots of time, confusion and pain.
Hey I gotta run to the mall, checking clothes and stuff, feel like tagging along Smoth?