SDK Questions

Look up line 1097 in CvGlobals.cpp and see what it is talking about.

I did, and it looks like somewhere you called CvGlobals.getTerrainInfo(i) with a value for i that is greater than the maximum allowed value. Check the code you added to make sure it can't use an invalid value. Like, perhaps a loop where instead of having the end condition be "i < GC.getNumTerrainInfos()" you have it with a "<=" instead.

If you don't know, all those "FAssert" functions are insisting that the condition that is specified must be true. It if isn't, they emit a message like you see and stop the program. (There is an optional message field that can be used to add more info, but it isn't used in this case - the condition itself is pretty self explanatory.) They are used in many places in Civ4 to stop you from trying to access data past the end of an array (index greater than the maximum allowed value), like this one, or before the beginning (index less than 0).
 
Anyone going to help!

This what happens when you only edit your last post instead of posting a new one - the thread doesn't get marked as changed...

In addition to God-Emperor's explanation, in the opened assert dialog you'll have a 'debug' button (or something like that) if you run it from VS (and maybe even if not). This will show you the current code and callstack in VS so you can see where the bad value comes from.
 
Back
Top Bottom