[SOLVED] Problem with a LUA script but nothing in lua.log

salaminizer

Colorado Internacional
Joined
Aug 12, 2006
Messages
221
Location
Porto Alegre, Brasil
SOLVED
I managed to use the FireTuner and detected a HORRIBLE STUPID MISTAKE that happened once (and when I copied over from the original file I lost it somehow): I forgot that in LUA there are THEN's. the FireTuner luckily detected it, although I dunno why it didn't appear in the lua.log (debug is off, maybe that's it?). the database errors are still there though!

Spoiler :
I'm trying to replace the TopPanel.lua script.
Before the tools were out, I successfully edited the original file, but now that it's in a mod there seems to be something wrong.
Besides replacing the script, I'm also adding a new text. I thought that the XML would be the cause of the error, but it works fine when I remove the LUA script from the mod and leave only the XML. I also tried using the string.format function in the script instead of the ConvertTextKey, but it didn't work.

I have added only a few lines in the script, and as I said, editing the original file works just fine. these are the lines added to the GoldenAgeTooltipHandler function:

Code:
local iTurns;
        if (iHappiness > 0)
            iTurns = pPlayer:GetGoldenAgeProgressThreshold() / iHappiness;
            iTurns = iTurns + 1;
            iTurns = math.floor(iTurns);
            --strText = string.format("%i turns left until next Golden Age",iTurns);
            strText = Locale.ConvertTextKey("TXT_KEY_NEXT_GOLDEN_AGE_TURN_LABEL", iTurns);
            strText = strText .. "[NEWLINE][NEWLINE]";
        end

yes, I have copied the entire file.

the XML tag:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 9/28/2010 9:38:50 PM -->
<GameData>
	<Language_en_US>
	<Row Tag="TXT_KEY_NEXT_GOLDEN_AGE_TURN_LABEL">
		<Text>Next Golden Age: {1_Num: number #} Turn(s)</Text>
	</Row>
	</Language_en_US>
</GameData>

There's nothing in my lua.log file, but there are some weird messages in the database.log:
Spoiler :

Code:
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_UNITEDSTATES" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_ARABIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_AZTECS" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_CHINA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_EGYPT" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_ENGLAND" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_FRANCE" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_GERMANY" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_GREECE" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_INDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_IROQUOIS" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_JAPAN" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_OTTOMAN" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_PERSIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_ROME" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_RUSSIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_SIAM" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_SONGHAI" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_BABYLON" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_AMERICA_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_ARABIA_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_AZTEC_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_CHINA_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_EGYPT_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_ENGLAND_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_FRANCE_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_GERMANY_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_GREECE_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_INDIA_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_IROQUOIS_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_JAPAN_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_OTTOMAN_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_PERSIA_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_ROME_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_RUSSIA_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_SIAM_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_SONGHAI_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_MINOR_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_BARBARIAN_PEDIA" does not exist in Language_en_US
[2089.851] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_BABYLON_PEDIA" does not exist in Language_en_US
[2089.867] Invalid Reference on Feature_YieldChanges.FeatureType - "FEATURE_RIVER" does not exist in Features
[2089.867] Invalid Reference on Feature_YieldChanges.FeatureType - "FEATURE_LAKE" does not exist in Features
[2089.867] Invalid Reference on Feature_YieldChanges.FeatureType - "FEATURE_LAKE" does not exist in Features

--
 
Those errors int he database.log file have always been there. Most are from obsolete functions that Civ5 doesn't use anymore (so there is no reason to include text strings).
 
Top Bottom