GC.getNumCivicInfos() == 0?

Did you read my last post? I'm done reading from XML. I need to store int values in m_aszExtraXMLForPass3 and read them out again. I have everything else figured out.
 
I also need to store some strings. Can you just tell me how to do this?
 
The vector is divided into units of five. In each unit, there is the Civic string and then the four commerce types. It would be possible to do it your way, but harder. Can you just tell me how to convert the int to a string and a string to an int? Please?

JUST TELL ME! :mad::mad::mad:

Sorry, just getting steadily more and more agitated.
 
String to int:
Code:
CvString str;
...
int num = atoi(str.c_str());

Int to string:
Code:
int num = 5;
CvString str = CvString.format("%d", num);
 
attachment.php


What does this mean?
 

Attachments

  • Civ4ScreenShot0012.JPG
    Civ4ScreenShot0012.JPG
    172.3 KB · Views: 116
Code and text entries? Elaborate.
 
All of the text in all the buildings is being problematic. I would have to copy the entire CvGameTextMgr::setBuildingHelpActual.
 
I've traced the problem back to it's source. GetChildXmlValByName is consistently returning HUGE numbers. I don't know why. Why is this happening?
 
Process of elimination: I set a breaktrap at GetChildXmlValByName. Before reading, m_iHealth was at it's initialization value, 0. After, it was a huge and illegible number. GetChildXmlValByName is working fine for all the other objects. CvBuildingInfo::read(CvXMLLoadUtility* pXML) is called from the .exe (Right?), so pXML would have no way of being corrupted.

Therefore, the error must lie somewhere in the building XML files.

So why am I not getting an XML error or a schema-style game crash?
 
Which XML element is this? Can you show a sample XML which returns the huge number on debugging? If this is XML you've added, can you show the schema changes?
 
All of the XML returns huge values. Every single GetChildXmlValByName returns a huge number. And BuildingClassInfo. Hold on, I gotta try something.

Edited out the changes to Schema. Didn't help.
 
Wait, I fixed it by... long story. Suffice to say I fixed it.
 
No idea. I copied the base CIV4BuildingSchema.xml file from RevDCM, and copied in all my changes, and it worked.
 
Back
Top Bottom