Spendoza
Chieftain
i want to make something like this:
12 ) 9 3)
the bold is my changes, totally doesn't work.
where did i go wrong?
12 ) 9 3)
Code:
local iHappiness = pPlayer:GetExcessHappiness();
local strHappiness;
local tHappinessTextColor;
[B]local zHappiness = string.format("([ICON_HAPPINESS_1][COLOR:60:255:60:255]%i[/COLOR],[ICON_HAPPINESS_4][COLOR:255:60:60:255]%i[/COLOR])", iTotalHappiness , iTotalUnhappiness);[/B]
-- Empire is Happiness
if (not pPlayer:IsEmpireUnhappy()) then
strHappiness = string.format("[ICON_HAPPINESS_1][COLOR:60:255:60:255]%i[/COLOR]", iHappiness);
-- Empire Really Unhappy
elseif (pPlayer:IsEmpireVeryUnhappy()) then
strHappiness = string.format("[ICON_HAPPINESS_4][COLOR:255:60:60:255]%i[/COLOR]", -iHappiness);
-- Empire Unhappy
else
strHappiness = string.format("[ICON_HAPPINESS_3][COLOR:255:60:60:255]%i[/COLOR]", -iHappiness);
end
Controls.HappinessString:SetText(strHappiness)[B],(zHappiness)[/B];
the bold is my changes, totally doesn't work.
where did i go wrong?