JFD
Kathigitarkh
I'm trying to call a string from a custom table definition, but it keeps returning the error: attempt to index field 'Civilization_LeaderTitles' (a nil value). I have no trouble calling the same information from existing tables, so I'm at a loss for what I'm doing wrong.
This is the SQL:
This is the Lua:
This is the SQL:
Spoiler :
Code:
-- Civilization Leader Titles Table
CREATE TABLE Civilization_LeaderTitles
(
CivilizationType TEXT DEFAULT NULL,
MightLeaderTitleText TEXT DEFAULT TXT_KEY_CHIEF_TITLE,
);
[/SPOILER]
This is the Lua:
Spoiler :
Code:
local CivType = player:GetCivilizationType();
GameInfo.Civilization_LeaderTitles[CivType].MightLeaderTitleText, player:GetNameKey(), player:GetCivilizationShortDescriptionKey());
[/SPOILER]