Linkman226
#anarchy
- Joined
- Sep 14, 2007
- Messages
- 2,493
Traceback (most recent call last):
File "CvScreensInterface", line 736, in forceScreenRedraw
File "CvMainInterface", line 789, in redraw
File "CvMainInterface", line 1712, in updateSelectionButtons
File "OIM", line 799, in showInquisitionButton
File "OIM", line 144, in getReligionInquisitor
File "OIM", line 129, in getReligionHolyOffice
AttributeError: 'NoneType' object has no attribute 'getPrereqReligion'
ERR: Python function forceScreenRedraw failed, module CvScreensInterface
def getReligionHolyOffice(iPlayer, iReligion):
# Orion's Inquisition Mod
# Returns the Holy Office Name for the specified Religion
pPlayer = gc.getPlayer(iPlayer)
pCivilization = gc.getCivilizationInfo(pPlayer.getCivilizationType())
for iBuildingClass in range(gc.getNumBuildingClassInfos()):
kBuilding = gc.getBuildingInfo(pCivilization.getCivilizationBuildings(iBuildingClass))
if kBuilding.getPrereqReligion() == iReligion:
iBuilding = pCivilization.getCivilizationBuildings(iBuildingClass)
#CyInterface().addImmediateMessage("C", "")
if gc.getBuildingInfo(iBuilding).getSpecialBuildingType() == gc.getInfoTypeForString("SPECIALBUILDING_HOLY_OFFICE"):
MyHolyOfficeName = gc.getBuildingInfo(iBuilding).getType()
#CyInterface().addImmediateMessage(str(MyHolyOfficeName), "")
return MyHolyOfficeName
break
Traceback (most recent call last):
File "CvScreensInterface", line 736, in forceScreenRedraw
File "CvMainInterface", line 789, in redraw
File "CvMainInterface", line 1712, in updateSelectionButtons
File "OIM", line 805, in showInquisitionButton
File "OIM", line 159, in getReligionInquisitor
RuntimeError: unidentifiable C++ exception
ERR: Python function forceScreenRedraw failed, module CvScreensInterface
def getReligionInquisitor(iPlayer, iReligion):
# Limited Religions
# Returns the Inquisitor Name for the specified Religion
pPlayer = gc.getPlayer(iPlayer)
pCivilization = gc.getCivilizationInfo(pPlayer.getCivilizationType())
PrereqBuildingName = getReligionHolyOffice(iReligion)
for iUnitClass in range(gc.getNumUnitClassInfos()):
if gc.getUnitClassInfo(iUnitClass).getMaxPlayerInstances() > 0:
iUnit = pCivilization.getCivilizationUnits(iUnitClass)
#iPrereqRel = gc.getUnitInfo(iUnit).getPrereqReligion()
#if (iPrereqRel >= 0):
# if iPrereqRel == iReligion:
# Look for state Religion Holy Office
iPrereqBld = gc.getUnitInfo(iUnit).getPrereqBuilding()
if (iPrereqBld >= 0):
if iPrereqBld == gc.getInfoTypeForString(PrereqBuildingName):
MyInquisitorName = gc.getUnitInfo(iUnit).getType()
#CyInterface().addImmediateMessage(str(MyInquisitorName), "")
return MyInquisitorName
break