[Bug #514] Nation Allegiance Change
Posted: Thu Feb 28, 2013 12:12 am
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
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.