Oh, ok, its probably just my impatience![]()

Another thing I think you mentioned is that if the background music is still playing it probably means the game hasn't frozen.
I can't remember if I've already said it buy great mapscript by the way!

Oh, ok, its probably just my impatience![]()
Traceback (most recent call last):
File "PerfectWorld_Original", line 4074, in addBonuses
File "PerfectWorld_Original", line 2106, in AddBonuses
File "PerfectWorld_Original", line 2293, in AssignBonusAreas
File "PerfectWorld_Original", line 2507, in CalculateAreaSuitability
File "PerfectWorld_Original", line 2483, in GetSameClassTypeCountInArea
TypeError: 'int' object is not callable
ERR: Python function addBonuses failed, module PerfectWorld
One other thing I noticed is that I always see the following in PythonErr.log:
Code:Traceback (most recent call last): File "PerfectWorld_Original", line 4074, in addBonuses File "PerfectWorld_Original", line 2106, in AddBonuses File "PerfectWorld_Original", line 2293, in AssignBonusAreas File "PerfectWorld_Original", line 2507, in CalculateAreaSuitability File "PerfectWorld_Original", line 2483, in GetSameClassTypeCountInArea TypeError: 'int' object is not callable ERR: Python function addBonuses failed, module PerfectWorld
I don't know if this is significant or not. I'm on a mac, btw.
What is "PerfectWorld_Original"? The line numbers don't match up in my version. If someone copied text from there to make a modified PerfectWorld, it's possible that the tabs don't line up, causing Python to interpret things wrong.
sameClassTypesInArea = self.GetSameClassTypeCountInArea(area,eBonus)
uRange = classInfo.getUniqueRange()
This seems to agree with the errors messages I'm seeing. Line 2483 is
Code:uRange = classInfo.getUniqueRange()
I don't know enough about python to know if this can generate that message.
classInfo = gc.getBonusClassInfo(eClass)
if classInfo == None:
return 0
uRange = classInfo.getUniqueRange() (line 2471)
uRange = classInfo.getUniqueRange
uRange = classInfo.getUniqueRange()
I'm not sure what to say, when I download a fresh copy of PerfectWorld.py, the uRange = classInfo.getUniqueRange() is line 2483. Are you sure you're looking at the same version of the file that's posted there? I don't see what could be causing the difference, I'm looking at a freshly downloaded file.
Edit: The API reference here lists getUniqueRange as an attribute not a method. Should this line read
Code:uRange = classInfo.getUniqueRange
instead of
Code:uRange = classInfo.getUniqueRange()
??? That seems like it could explain this message. But 'getUniqueRange' seems like a funny name for an attribute, maybe the API reference is wrong?
Traceback (most recent call last):
File "PerfectWorld", line 4074, in addBonuses
File "PerfectWorld", line 2112, in AddBonuses
File "PerfectWorld", line 2203, in AddBonusType
File "PerfectWorld", line 2331, in CanPlaceBonusAt
TypeError: 'int' object is not callable
ERR: Python function addBonuses failed, module PerfectWorld
Traceback (most recent call last):
File "PerfectWorld", line 4074, in addBonuses
File "PerfectWorld", line 2112, in AddBonuses
File "PerfectWorld", line 2203, in AddBonusType
File "PerfectWorld", line 2344, in CanPlaceBonusAt
TypeError: bad operand type for unary -
ERR: Python function addBonuses failed, module PerfectWorld
So my changes are making the original errors disappear, but are obviously not fixing the situation. Let me know if you want me to do some more testing/investigation.
classInfo.getUniqueRange
bonusInfo.getUniqueRange()
print "(Added by dr_s at 2331) classInfo = "
print classInfo
iRange = classInfo.getUniqueRange
print "(Added by dr_s) iRange = "
print iRange
print "(Added by dr_s at 2343) bonusInfo = "
print bonusInfo
iRange = bonusInfo.getUniqueRange()
print "(Added by dr_s) iRange = "
print iRange
print "(Added by dr_s at 2483) classInfo = "
print classInfo
uRange = classInfo.getUniqueRange
print "(Added by dr_s) uRange = "
print uRange
(Added by dr_s at 2331) classInfo =
<CvPythonExtensions.CvBonusClassInfo object at 0x18325148>
(Added by dr_s) iRange =
4
(Added by dr_s at 2343) bonusInfo =
<CvPythonExtensions.CvBonusInfo object at 0x183250d8>
(Added by dr_s) iRange =
7
(Added by dr_s at 2483) classInfo =
<CvPythonExtensions.CvBonusClassInfo object at 0x18325068>
(Added by dr_s) uRange =
5
int CvBonusClassInfo::getUniqueRange() const
{
return m_iUniqueRange;
}
Also, that error you are getting is very strange. Clearly, the classInfo var is holding an object, yet you get an error saying you can't call a method on an 'int'. But it's not an int....
My hypothesis is that getUniqueRange is supposed to be a method, based on its name, for both CivBonusInfo and CivBonusClassInfo, but it's not, at least not in the Mac version of Civ (or maybe in Civ Vanilla).
On an unrelated matter, I sometimes see very food-poor starting locations (see attached screenshot) and I wonder if you have a comment about that. (BTW, there isn't any nearby food just out of range of the screenshot.)