Fastjack
Chieftain
I am customizing the tectonics map script to suit my mod (with the creator's permission)... here is the code. This section is the only thing I have changed.
This is the error message, it just pops up 6 or 7 times just after launcher. I don't see any syntax errors, do you? I don't really know Python, just monkey see monkey do-ing it.
Code:
def createMap(self):
for y in range(self.mapHeight - 5):
for x in range(self.mapWidth):
i = y*self.mapWidth + x
height = self.heightMap[i]
if (height > self.peakAltitude):
if (self.dice.get(7,"Random pass") == 6):
self.plotTypes[i] = PlotTypes.PLOT_HILLS
else:
self.plotTypes[i] = PlotTypes.PLOT_PEAK
elif (height > self.hillAltitude):
if (self.dice.get(20,"Random peak") == 19):
self.plotTypes[i] = PlotTypes.PLOT_PEAK
else:
self.plotTypes[i] = PlotTypes.PLOT_HILLS
elif (height > self.landAltitude):
self.plotTypes[i] = PlotTypes.PLOT_LAND
else:
self.plotTypes[i] = PlotTypes.PLOT_OCEAN
for y in range((self.mapHeight - 5), (self.mapHeight + 5)):
for x in range(self.mapWidth):
i = y*self.mapWidth + x
if y <= (self.mapHeight - 3):
self.plotTypes[i] = PlotTypes.PLOT_ICE
elif y <= (self.mapheight + 3):
self.plotTypes[i] = PlotTypes.PLOT_PEAK
else:
self.plotTypes[i] = PlotTypes.PLOT_HILLS
for y in range((self.mapHeight + 5), (self.mapHeight * 2)):
for x in range(self.mapWidth):
i = y*self.mapWidth + x
height = self.heightMap[i]
if (height > self.peakAltitude):
if (self.dice.get(7,"Random pass") == 6):
self.plotTypes[i] = PlotTypes.PLOT_HILLS
else:
self.plotTypes[i] = PlotTypes.PLOT_PEAK
elif (height > self.hillAltitude):
if (self.dice.get(20,"Random peak") == 19):
self.plotTypes[i] = PlotTypes.PLOT_PEAK
else:
self.plotTypes[i] = PlotTypes.PLOT_HILLS
elif (height > self.landAltitude):
self.plotTypes[i] = PlotTypes.PLOT_LAND
else:
self.plotTypes[i] = PlotTypes.PLOT_OCEAN
This is the error message, it just pops up 6 or 7 times just after launcher. I don't see any syntax errors, do you? I don't really know Python, just monkey see monkey do-ing it.
Code:
Traceback (most recent call last):
File "<string>", line 1, in ?
File "<string>", line 35, in load_module
File "<string>", line 13, in_get_code
File "Tectonics", line 493
if y <= (self.mapHeight - 3):
^
SyntaxError: invalid syntax