bmarnz
Prince
I'm trying to get my inquisitor to remove non-state reliogious buildings.
This is what I have so far.
I get this error in log.
AttributeError: 'CyCity' object has no attribute 'setHasBuilding'
I'd appreciate any help. Please
This is what I have so far.
Code:
# removes buildings
for iBuildingLoop in range(gc.getNumBuildingInfos( )):
if pCity.isHasBuilding( iBuildingLoop ):
pBuilding = gc.getBuildingInfo( iBuildingLoop )
iRequiredReligion = pBuilding.getPrereqReligion( )
for iReligionLoop in range(gc.getNumReligionInfos()):
if iReligionLoop != pPlayer.getStateReligion( ):
if iRequiredReligion == iReligionLoop:
pCity.setHasBuilding( iBuildingLoop, -1 )
I get this error in log.
AttributeError: 'CyCity' object has no attribute 'setHasBuilding'
I'd appreciate any help. Please