Error Message?

First guess...

Did you remove the Crusades from your mod? Accidentally even? Then that would cause issues. I would double check that first.
 
First guess...

Did you remove the Crusades from your mod? Accidentally even? Then that would cause issues. I would double check that first.

No, then i would have an error that no building is there. I looked and the building and the unit are still there.

I didnt do anything to the XML , just re-did some python is all.
 
I'm not a python expert, but I'm actually quite sure the problem is here:
Code:
	def onBuildingBuilt(self, argsList):
		'Building Completed'
		pCity, iBuildingType = argsList
		game = gc.getGame()
		[B]if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == gc.getGame().getActivePlayer()) and isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):[/B]
### Crusade Start ###

		if ( iBuildingType == gc.getInfoTypeForString("BUILDING_CRUSADE") ):

			pPlayer = gc.getPlayer(pCity.plot().getOwner())
			iPID = pPlayer.getID()
			iTID = pPlayer.getTeam()
			iX = pCity.getX()
			iY = pCity.getY()
			u_crusader = gc.getInfoTypeForString( 'UNIT_CRUSADER' )

			for i in range(1):
				pNewUnit = pPlayer.initUnit( u_crusader, iX, iY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.NO_DIRECTION )

### Crusade End ###
			if ((pCity.getOwner() == gc.getGame().getActivePlayer())):
			# If this is a wonder...
			popupInfo = CyPopupInfo()
			popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
			popupInfo.setData1(iBuildingType)
			popupInfo.setData2(pCity.getID())
			popupInfo.setData3(0)
			popupInfo.setText(u"showWonderMovie")
			popupInfo.addPopup(pCity.getOwner())
Move the line in bold under your code. It should do it, I quess.
 
I'm not a python expert, but I'm actually quite sure the problem is here:
Code:
	def onBuildingBuilt(self, argsList):
		'Building Completed'
		pCity, iBuildingType = argsList
		game = gc.getGame()
		[B]if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == gc.getGame().getActivePlayer()) and isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):[/B]
### Crusade Start ###

		if ( iBuildingType == gc.getInfoTypeForString("BUILDING_CRUSADE") ):

			pPlayer = gc.getPlayer(pCity.plot().getOwner())
			iPID = pPlayer.getID()
			iTID = pPlayer.getTeam()
			iX = pCity.getX()
			iY = pCity.getY()
			u_crusader = gc.getInfoTypeForString( 'UNIT_CRUSADER' )

			for i in range(1):
				pNewUnit = pPlayer.initUnit( u_crusader, iX, iY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.NO_DIRECTION )

### Crusade End ###
			if ((pCity.getOwner() == gc.getGame().getActivePlayer())):
			# If this is a wonder...
			popupInfo = CyPopupInfo()
			popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
			popupInfo.setData1(iBuildingType)
			popupInfo.setData2(pCity.getID())
			popupInfo.setData3(0)
			popupInfo.setText(u"showWonderMovie")
			popupInfo.addPopup(pCity.getOwner())
Move the line in bold under your code. It should do it, I quess.


Yeah your probably right, i never even noticed that line, thx. Too much of a hurry and too tired i guess., i'll take a gander at it.

EDIT: I had to change it completely and like you said UNDER ##crusade end## to:

if ((pCity.getOwner() == gc.getGame().getActivePlayer())):
 
OK now i get this for a starting error?

Traceback (most recent call last):

File "CvGameInterface", line 154, in cannotConstruct

Code:
def cannotConstruct(argsList):
	#CvUtil.pyPrint( "CvGameInterface.cannotConstruct" )
	[B]return gameUtils().cannotConstruct(argsList)[/B]

File "InquisitionGameUtils", line 70, in cannotConstruct

Code:
def cannotConstruct(self,argsList):
		pCity = argsList[0]
		eBuilding = argsList[1]
		bContinue = argsList[2]
		bTestVisible = argsList[3]
		bIgnoreCost = argsList[4]
		pPlayer = gc.getPlayer(pCity.getOwner())
		iPlayer = pPlayer.getID()
		[B]MyHolyOffice = str(getReligionHolyOffice(iStateReligion))[/B]
				
		if eBuilding == gc.getInfoTypeForString(MyHolyOffice):
			if Inquisition.hasProhibitedCivic(iPlayer):
				return True

		return False		
			
	def AI_chooseProduction(self,argsList):

NameError: global name 'getReligionHolyOffice' is not defined
ERR: Python function cannotConstruct failed, module CvGameInterface
 
Also, once you add the getReligionHolyOffice function you will then find that the iStateReligion you are passing to it is not defined...
 
OK i got what was causing this error, it was an extra file that was made with the modcomp and i had to integrate it to the older file.

But now i am having a problem with any religion just being founded even if they dont have the required preq as specified, and i dont have Choose Religions on?
 
Mmhh, if he's not more around, then it's a real problem :/.

forceScreenRedraw failed: Can you reproduce it?
Some other modders (including me) also had that problem, but was not reproducable.
One time, Capo had that problem, which was caused through an graphical error in a unit.
Can maybe also be caused through a bad button.
But i see "setDirty", so it's maybe a problem with the PlotLSystem.xml, but no idea, where :dunno:.
 
That looks like three different errors. Paste the actual stack trace. Also, I think you're bolding the wrong lines if those are supposed to be in a single stack trace because each line does not call the next line you bolded. A stack trace shows the flow of the program from function to function:

Code:
def foo():
    x = 5
    y = 2
    [B]if bar(x, y):[/B]
        # jump for joy!

def bar(x, y):
    x += 3
    y *= 4
    if x < y:
        [B]baz("yay")[/B]

def baz(msg)
    [B]print msg[/B]

Here you can see I've bolded each line that calls the next function. At the third bolded line--print msg--the stack trace would show foo(), bar(), baz() because that is the path to that line of code. The lines you bolded do not contain calls to functions in CvMainInterface. The first doesn't contain any function calls. The second does a call to the SDK. Are you sure you're lining up the correct line numbers in the correct version of CvMainInterface.py that you're using in-game?
 
OK i got this message when i tried to put some BUG and Rev stuff in a mod?

Traceback (most recent call last):
File "BugEventManager", line 350, in _handleDefaultEvent
Code:
def _handleDefaultEvent(self, eventType, argsList):
		if self.EventHandlerMap.has_key(eventType):
			for eventHandler in self.EventHandlerMap[eventType]:
				try:
					[B]eventHandler(argsList)[/B]
				except:
					BugUtil.trace("Error in %s event handler %s", eventType, BugUtil.escapeXml(eventHandler))

File "RevolutionInit", line 101, in onGameStart
Code:
def onGameStart( self, argsList ) :
        
        print "Gaming starting now"
        
        [B]self.onGameLoad( None )[/B]

File "RevolutionInit", line 170, in onGameLoad
Code:
if( not self.bFoundConfig ) :
            popup = PyPopup.PyPopup( )
            bodStr = "WARNING:  " + self.configFileName + " not found!  Revolution components using default settings."
            [B]bodStr += "  Check mod installation directory, should be:\n\n" + BugPath.mainModIniDir[/B]
            bodStr += "\n\nOr:\n\n" + BugPath.userDir
            bodStr += self.getRevComponentsText()
            popup.setBodyString( bodStr )
            popup.launch()

AttributeError: 'module' object has no attribute 'mainModIniDir'
 
Don't access variables directly from BugPath. Instead use the functions defined for them such as "BugPath.getModFolder()", etc. In this case I think you want getSettingsFolder().
 
Don't access variables directly from BugPath. Instead use the functions defined for them such as "BugPath.getModFolder()", etc. In this case I think you want getSettingsFolder().

Traceback (most recent call last):
File "BugEventManager", line 350, in _handleDefaultEvent
File "RevolutionInit", line 101, in onGameStart
File "RevolutionInit", line 170, in onGameLoad
AttributeError: 'module' object has no attribute 'getSettingsFolder'
 
Top Bottom