As outlined by tracker bug #514:
Bug #514
The problem was that certain variables were defined as local, they would go out of scope once the function ended, thus the next function wouldn't set nation or remove gil correctly.
The fix can be done in two ways:
- Using global variables
- Checking the nation + nation rank cost in both functions (avoiding global variables)
I have included both options. Its a option of which to pick. They both achieve the same end result, although one may be slightly better than the other.
[Bug #514] Nation Allegiance Change
Re: [Bug #514] Nation Allegiance Change
globals is always a worse option
-
- Developer
- Posts: 176
- Joined: Tue Jul 31, 2012 7:21 am