EricNgui
CPU of 1980's Planeptune
Hello, everyone. Well i try to create UI that happened when we can have diplo-marriage when that civ have met the condition enough.
But i have this problem...
Here is the LUA script
How to fix it?
But i have this problem...

Code:
Runtime Error: C:\Users\user\Documents\My Games\Sid Meier's Civilization 5\MODS\Cloche Leythal Pastalia (v 2)\LUA/ClocheDialog.lua:17: attempt to index field 'Message' (a nil value)
Here is the LUA script
Spoiler :
Code:
local bDummy = GameInfoTypes.BUILDING_GRAND_BELL_INFLUENCE;
local bNever = GameInfoTypes.BUILDING_CLOCHE_WILL;
include("IconSupport")
function OnOK()
ContextPtr:SetHide(true)
end
--IconHookup(1, 80, "CIV_COLOR_ATLAS_CLOCHE", Controls.DialogTopIcon)
local csname = "";
Controls.Message:LocalizeAndSetText( "TXT_KEY_TEST_CLOCHEPOPUP", csname)
function PastaliaPopup (pPlayer, eReligion, tPlayer, tCity)
Controls.PastaliaPopBox:SetHide(false)
Controls.PastaliaPop:SetHide(false)
csname = Locale.ConvertTextKey(tCity:GetName());
Controls.Message:LocalizeAndSetText( "TXT_KEY_TEST_CLOCHEPOPUP", csname)
UI.LookAt(tCity:Plot(), 0);
Controls.VIEW:RegisterCallback(Mouse.eLClick, function ()
--UIManager:QueuePopup(Controls.EmptyPopup, PopupPriority.GenericPopup+1);
-- local CityScreenClosed = function()
-- UIManager:DequeuePopup(Controls.EmptyPopup);
-- Events.SerialEventExitCityScreen.Remove(CityScreenClosed);
--end
--Events.SerialEventExitCityScreen.Add(CityScreenClosed);
--UI.SetCityScreenViewingMode(true);
--UI.DoSelectCityAtPlot( tCity:Plot() );
Controls.PastaliaPopBox:SetHide(true)
Controls.PastaliaPop:SetHide(true)
Controls.PastaliaPopBack:SetHide(false)
Controls.PastaliaPopBackBox:SetHide(false)
UI.LookAt(tCity:Plot(), 0);
end)
Controls.BACK:RegisterCallback(Mouse.eLClick, function ()
Controls.PastaliaPopBox:SetHide(false)
Controls.PastaliaPop:SetHide(false)
Controls.PastaliaPopBack:SetHide(true)
Controls.PastaliaPopBackBox:SetHide(true)
end)
Controls.OK:RegisterCallback(Mouse.eLClick, function ()
Controls.PastaliaPopBox:SetHide(true)
Controls.PastaliaPop:SetHide(true)
PastaliaDomination (pPlayer, eReligion, tPlayer, tCity)
end)
Controls.NEVER:RegisterCallback(Mouse.eLClick, function ()
Controls.PastaliaPopBox:SetHide(true)
Controls.PastaliaPop:SetHide(true)
tCity:SetNumRealBuilding(bNever, 1)
--tPlayer:ChangeMinorCivFriendshipWithMajor(pPlayer, -30)
end)
Controls.LATER:RegisterCallback(Mouse.eLClick, function ()
Controls.PastaliaPopBox:SetHide(true)
Controls.PastaliaPop:SetHide(true)
tCity:SetNumRealBuilding(bDummy, 0)
--tPlayer:ChangeMinorCivFriendshipWithMajor(pPlayer, -10)
end)
end
How to fix it?