Thanks for the instruct guys I have made the changes so hopefully we are all good now
that python error was starting to get irratating
Doh... New error
NameError: global name 'Immigration' is not defined
Now there is also a python file called immigration which is in my mod, so I am not sure if the 2 things are linked or not.. (or if they somehow need to be and they are not properly..)
that python error was starting to get irratating
Doh... New error
NameError: global name 'Immigration' is not defined
Spoiler :
Code:
iOwner = pCity.getOwner()
pPlayer = gc.getPlayer(iOwner)
UnitType = unit.getUnitType()
iImmigrant = gc.getInfoTypeForString("UNIT_IMMIGRANT")
intCity = Immigration.getLeastPopulatedCity(iOwner) [COLOR="Red"]<--this line[/COLOR]
if UnitType == iImmigrant:
#CyInterface().addImmediateMessage("B", "")
if pPlayer.isAlive() and not pPlayer.isBarbarian():
ReducedCityPopulation = pCity.getPopulation() - 2
pCity.setPopulation(ReducedCityPopulation)
if intCity != -1:
MigrationCity = pPlayer.getCity(intCity)
Immigration.doImmigrantPlacementAI(unit, MigrationCity)
Now there is also a python file called immigration which is in my mod, so I am not sure if the 2 things are linked or not.. (or if they somehow need to be and they are not properly..)