The hell?

Frossa

Prince
Joined
Apr 29, 2012
Messages
413
Location
Sweden
I'm having trouble getting my mod to work, and apparently it has to do with the languages of the TXT_KEY defines.
The weird thing is that it's talking about Language_zh_CN. Whatever that language is, I am only using English, so there is really no reason at all for this to appear in the database.log:

Code:
[18374.702] no such table: Language_zh_CN
[18374.702] In Query - insert into Language_zh_CN('Tag', 'Text') values (?, ?);
[18374.702] In XMLSerializer while updating table Language_zh_CN from file Localization/IGE_ZH_CN.xml.
[18375.841] columns Language, Tag are not unique
[18375.841] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[18375.841] In XMLSerializer while inserting row into table insert into Language_en_US('Tag', 'Text') with  values (TXT_KEY_PROMOTION_TIGHT_FORMATION, Civilopedia entry, ).
[18375.841] In XMLSerializer while updating table Language_en_US from file newpromotions.xml.
[18375.856] columns Language, Tag are not unique
If I remove the Language_en_US rows completely from the xml file, I get no error.
What could possibly be causing this?
 
I'm having trouble getting my mod to work, and apparently it has to do with the languages of the TXT_KEY defines.
The weird thing is that it's talking about Language_zh_CN. Whatever that language is, I am only using English, so there is really no reason at all for this to appear in the database.log:

Code:
[18374.702] no such table: Language_zh_CN
[18374.702] In Query - insert into Language_zh_CN('Tag', 'Text') values (?, ?);
[18374.702] In XMLSerializer while updating table Language_zh_CN from file Localization/IGE_ZH_CN.xml.
[18375.841] columns Language, Tag are not unique
[18375.841] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[18375.841] In XMLSerializer while inserting row into table insert into Language_en_US('Tag', 'Text') with  values (TXT_KEY_PROMOTION_TIGHT_FORMATION, Civilopedia entry, ).
[18375.841] In XMLSerializer while updating table Language_en_US from file newpromotions.xml.
[18375.856] columns Language, Tag are not unique
If I remove the Language_en_US rows completely from the xml file, I get no error.
What could possibly be causing this?

You've got an en_US error in there as well. In your "newpromotions.xml" file, "TXT_KEY_PROMOTION_TIGHT_FORMATION" isn't unique (the other instance of this key may be in a different file). The zh_CN error looks like it's coming from the IGE mod.
 
Oh, I assumed Ingame Editor was free of errors. O_o
But TXT_KEY_PROMOTION_TIGHT_FORMATION is only defined in newpromotions.xml, so that shouldn't be a problem.
Or what do you mean by the other instance of this key may be in a different file?
 
Oh, I assumed Ingame Editor was free of errors. O_o

I'd say the issue with IGE is it has a Chinese translation (I assume zh_CN is Chinese) and you don't have the Chinese language for CiV installed. This shouldn't cause any issues, since the Chinese localization of IGE should just fail to load. (Though, anything else placed in that file in IGE will also fail, I would assume they just put the localization by itself in that file, especially given its name.)

But TXT_KEY_PROMOTION_TIGHT_FORMATION is only defined in newpromotions.xml, so that shouldn't be a problem.
Or what do you mean by the other instance of this key may be in a different file?

I mean that text key is only allowed to be defined once. Not once in any individual file, once overall. If you have other files that add text keys, make sure you haven't copied and pasted this name into another tag by accident. (Ctrl+f and look for the text key in the entire solution, and see if it shows up more than once.)

Failing that, you might be conflicting with another mod. Try enabling your mod by itself and see if the error persists. If that makes it disappear then, if you want to be compatible with whatever mod it is that also defines that key, you'll need to change the name of the key in your mod. (Or ask the author of the other mod to change theirs, but it's much easier to change your own and since the keys themselves are never displayed to the user, it doesn't cost you anything.)
 
Found the source of the problem.
On any of the game's original promotions, there is both a Description and a PediaEntry, and they both use the same TXT_KEY thing. I copied the properties of one of the original promotions and therefore ended up with two texts with the same name. :rolleyes:
Oh well, thanks a lot for your help. Never would have figured this out otherwise :goodjob:
 
Top Bottom