Jump to content

Alliance getMembers bug/API change?


Rinart73

Recommended Posts

Starting from verison 0.18.3 Alliance:getMembers() returns a set of player indexes. But in the API docs I see the old description:

function table<int, Member> getMembers()

 

So basically instead of doing this:

for pIndex, _ in pairs(Alliance(allianceIndex):getMembers()) do
    -- something
end

Now modders need to do this:

for _, pIndex in pairs({Alliance(allianceIndex):getMembers()}) do
    -- something
end

 

I guess you just forgot to update API docs. But it still was a very frustrating experience :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...