Strange SDK related errors

Pickly

Prince
Joined
Jun 5, 2009
Messages
535
These errors are from me modding an FfH based mod mod so that specialists can provide health and happiness. (Those changes appear to work when I run the game with a debug.dll and ignore the errors described in this post.) When I try to run the game normally, though, it crashes when loading the XML, and when I run with a debug.dll, the following errors seem to pop up:

When I load the mod:
Spoiler :
Assert Failed

File: CvGlobals.cpp
Line: 3450
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: type FLAVOR_ECONOMY not found


When I try to start a game. (Using custom game, it stalls while loading the new game.)
Spoiler :
Assert Failed

File: CvGlobals.cpp
Line: 3666
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type NO_IMPROVEMENT not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml


When opening a city screen.
Spoiler :
Assert Failed

File: CvCity.cpp
Line: 10792
Expression: iIndex < getNumCityPlots()
Message: iIndex expected to be < getNumCityPlots()


I'm a bit confused at these since none of these errors (whether the XML related parts or the SDK locations), are things I've changed, and don't appear to be closely related to anything I've changed. Is anyone else familiar with these sorts of errors?
 
I did go back and test it with the previous dll (which worked, not too surprisingly), plus a debug dll of the first one, and the same issues occured in the previous debug as occured in the debug I adjusted, although for some reason the normal first dll runs fine, while the second one crashes.

The Flavor_economy issue was easy to fix in XML, although I'm now surprised that the game worked before, since its an issue that has been in game for awhile. Strangely, though, while the debug.dll loads perfectly fine, the my modified dll still crashes at the start, which is quite confusing.

The other issue is also quite strange, since neither the XML file described in the error, nor the regular BTS espionage file, have anything saying NO_IMPROVEMENT.


I guessing this will probably be some sort of typo or programming mistake done in the changes I made (That somehow isn't directly effecting the mechanics in question) that I'll certainly be looking for. But, as usual, if anyone else has run into these sorts of issues, help or information is appreciated.
 
Don't cont on it being the specified XML file.

CIV4EspionageMissionInfo.xml is apparently the last XML file that is processed. Therefore anything that happens after it is loaded can report it as being the "Current XML file" since its name just hangs around in the variable that stores that info.

That assert is in the getInfoTypeForString function, so NO_IMPROVEMENT may well appear in the mod's Python somewhere. It would be doing something like iThingy = gc.getInfoTypeForString( "NO_IMPROVEMENT"). I just checked: the Erebus.py map script that come with FfH2 uses "NO_IMPROVEMENT" and a couple more that come with Wild Mana do too.
 
Am now back after a few weeks, related to a new computer, to be taking a stab at this.

I'll definitely be trying out removing the NO_IMPROVEMENT from files and seeing if that allows everything to start fine (which, if it worked, would still leave the question of why changing specialists to allow health and happiness would somehow cause a map python file to crash the game, but i guess that's how it goes.), but currently have some new compiling issues on the new computer.


I'm in Windows 7 (switched from XP), and am now using visual studios 2010, (Couldn't find 2008 or 2005 while looking a few days ago), which took some time to set up, but I've been able to find the command lines and such (possibly, this may of course be the issue.), but have gotten a couple of errors when trying ot compile both in visual studios itself, and in the command window.

In visual studios:

Spoiler :

1>------ Build started: Project: CvGameCoreDLL, Configuration: Final Release Win32 ------
1>
1> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>NMAKE : fatal error U1073: don't know how to make 'CvArea.cpp'
1> Stop.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "nmake Final_Release" exited with code 2.


In the command window:

Spoiler :

"C:/Program is not recognized as an internal or external command, operable program or batch file.
NMAKE: Fatal error U1077: '"C:/Program Files(x86)/Microsoft Visual C++ Toolkit 2003/bin/cl.exe' : return code '0x1'

 
The project and makefile are not configured correctly.
You can download both VS2008 express and ready-to-work project file and makefile from my tutorial.
 
@Asaf: Your files didn't work at all. Explanations in your thread.
 
Well, it's now figured out, turned out fixing a mistyped XML line fixes things. (Which explains the odd variety of errors from things I didn't change, though doesn't explain why the game worked in the debug DLL earlier in the thread.) Thank you everyone for responding to the thread.
 
Back
Top Bottom