Craig_Sutter
Deity
I can't figure out why this does not work. The log is clean and the mod starts normally... but Sweden and Denmark are neutral in their relations. And the print command is not printing out their names in the log. It does not work whether or not I put the print command in... so it is not that part.
Advice would be appreciated. Thank-you.
Code:
-- Lua Script2
-- Author: Craig and Nancy
-- DateCreated: 7/26/2012 8:52:58 AM
--------------------------------------------------------------
GameEvents.GetScenarioDiploModifier1.Add(function(ePlayer1, ePlayer2)
if (ePlayer1 == GameInfo.Civilizations["CIVILIZATION_DENMARK"].ID and ePlayer2 == GameInfo.Civilizations["CIVILIZATION_SWEDEN"].ID) or (ePlayer2 == GameInfo.Civilizations["CIVILIZATION_DENMARK"].ID and ePlayer1 == GameInfo.Civilizations["CIVILIZATION_SWEDEN"].ID) then
print(ePlayer1:GetName())
print(pPlayer2:GetName())
return -50
else
return 0
end
end)
Advice would be appreciated. Thank-you.