Barbarian King
Prince
- Joined
- May 4, 2010
- Messages
- 346
@Gurra09, @Chrisbburn
I have tested my mod with Historic Religions, More Pantheons, and various denomination add-ons without issue, so I think I can safely rule those out as causing the problem. I will take a look at some of the other mods you mentioned and see if I can find any conflicts with mine.
That's good to know; thanks for the info.
I have tested my mod with Historic Religions, More Pantheons, and various denomination add-ons without issue, so I think I can safely rule those out as causing the problem. I will take a look at some of the other mods you mentioned and see if I can find any conflicts with mine.
It's more efficient - both pairs() and ipairs() are very inefficient (although you'll only notice a difference if you're within an event that calls many times, or you're writing loops within loops) - there are several threads about Lua optimisation/efficiency in the SDK sub-forum.
The other advantage is that you can stop the looping early, eg by using MAX_MAJOR_CIVS as suggested by JFD. Both pairs(Players) and ipairs(Players) will loop all 64 player slots - even those where the player was never alive, and also the barbarians (player 63)
That's good to know; thanks for the info.