I thought I was just having a problem with StartingPlot, but looks like it's a more generic problem.
I have a mod that loads into the game without a problem like this...
The problem I run into is whenever I add any statement to def makeunit referring back to the variables listed in the def makeunit line the mod will not load - it stops when it gets to loading the Python modules. For example, if I add
iX = iNum
it won't load.
If I add iX = iUnit
it won't load.
If I add iX = tPlot.getX()
it won't load.
The test pop-up works fine, so I know that the makeunit function is being accessed, I just can't get any of the variables to work.
Any ideas on what I'm doing wrong?
Thanks!
I have a mod that loads into the game without a problem like this...
Code:
def setup(self): # find human player bComputer = True iCount = 0 tStartPlot = (00, 00) while bComputer: pPlayer = gc.getPlayer(iCount) if (pPlayer.isHuman()): bComputer = False pHuman = pPlayer # get human player starting location tStartPlot = pHuman.getStartingPlot() # add additional units to the human player's civ self.makeUnit(iSettler, pHuman, tStartPlot, 1) self.makeUnit(iScout, pHuman, tStartPlot, 1) self.makeUnit(iWarrior, pHuman, tStartPlot, 1) else: iCount = iCount + 1 ################# ### Utilities ### ################# def makeUnit(self, iUnit, pPlayer, tPlot, iNum): # display test message self.displayTestPopup()
iX = iNum
it won't load.
If I add iX = iUnit
it won't load.
If I add iX = tPlot.getX()
it won't load.
The test pop-up works fine, so I know that the makeunit function is being accessed, I just can't get any of the variables to work.
Any ideas on what I'm doing wrong?
Thanks!
Comment