What's wrong with this addMessage statement?

rezaf

Warlord
Joined
Dec 3, 2003
Messages
179
For my Forestry mod, I want to display a notification message, just like the one that appears when a forest grows naturally.
Trip suggested this was possible by using the CyInterface.addMessage() function.
However, this function takes a TON of parameters. I tried adding all those, but I made some mistake I can't pinpoint. :(

Can anybody tell me what obvious error I made?

CyInterface().addMessage(pPlot.getOwner(),false,20,'A Tree Nursery has turned into a Forest',gc.getGoodyInfo(0).getSound(),0,gc.getFeatureInfo(4).getIcon(),CvGame().getReplayMessageColor(0),pPlot.getX(),pPlot.getY(),true,true)
_____
rezaf
 
true should be True
false should be False (capitalization is very important in Python)

is there meant to be a space in "getReplyMessageColo r(0)" or "getFeat ureInfo(4)"

other than than im not sure
 
I am not as familiar with civ python, but that looks like the kind of error I get in FF python when I forget necessary punctuation, expecially commas, parantheses, or quotes. Basically, the engine is reading that all as one massive command, instead of several.
 
weakciv said:
true should be True
false should be False (capitalization is very important in Python)

is there meant to be a space in "getReplyMessageColo r(0)" or "getFeat ureInfo(4)"

other than than im not sure

CIV's Python gobbles lower case booleans without complaining. I think there's some function in place which handles this, but in any case, the booleans are not the problem. And the spaces are naturally a pasting issue. Even I wouldd not miss something THAT obvious. ;)

catwhowalksbyhi: Well, I couldn't point out a place where I missed puncuation or something. That's why I posted this thread...

So, anybody else able to point out my mistake?
_____
rezaf
 
Back
Top Bottom