• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days (this includes any time you see the message "account suspended"). For more updates please see here.

Baffled by XML error messages

hnmcc

Chieftain
Joined
Aug 2, 2007
Messages
7
Location
Great Britain
I'm making some minor customisations to basic CIV4 (1.61). This is part complete.

When I start the game, I see two error messages (altho' the game goes on to start as it should):

Tag: TECH_COMMUNISM in Info class was incorrect Current XML file is: Units/CIV4UnitInfos.xml

and

Tag: UNIT_IRONCLAD in Info class was incorrect Current XML file is: Units/CIV4UnitInfos.xml

These confuse me a lot. Obviously my ignorance is to blame, but right now I have no ideas about how to make any progress :(

I haven't made changes anywhere near the only reference I can find to Communism in that file (PrereqTech for Spy), and I've only changed the range of the Ironclad.

Previously I've encountered (and dealt with) problems caused by tags not closed or nested incorrectly. But this just baffles me, because I can't even tell from the message WHERE I should be looking! I'm no longer sure I'm even looking in the right file...

So: where should I look, and what sort of thing should I be looking for? :confused:
_
 
You had to have added TECH_COMMUNISM somewhere, because it doesn't exist. It's TECH_UTOPIA. As far as the other error goes, it should give you a line #, when something like this happens to me I use the go to function in notepad and check the line it gives me to figure out what is causing the error.
 
phungus -- thanks very much for this.

Opens up a bigger mystery, because when I look at the standard game version of the CIV4UnitInfos Spy PrereqTech, it's exactly as you say - TECH_UTOPIA; and when I look at the file I've been amending, it's as I say - TECH_COMMUNISM.

I may be decrepit, but I would certainly remember if I'd knowingly changed something like that! So I must have got the file contaminated/corrupted in some other way - heaven only knows how.

Still, it gives me a partial answer: start afresh.

As to a line reference, even I might have thought to follow that - had there been one, which there wasn't :D

The error messages were EXACTLY as I reproduced them - hence my feelings of frustration.
 
> The error messages were EXACTLY as I reproduced them - hence my feelings of frustration.

Just look for the first occurrence of the problem string (eg UNIT_IRONCLAD).

They did improve the error messages *some* along the way, but don't wait around for them to back-port such things!

Either be meticulously accurate in your changes, or do what most people do and learn how to find problems ;) Try using some sort of "diff" program instead of starting over.
 
Thanks PS

I hadn't gone far with it, so starting afresh (with a little more testing as I go) seems the best course - because if you have an error and you know what you did immediately beforehand, you're most of the way there already.
 
Back
Top Bottom