Happiness: Extra Info

Spendoza

Chieftain
Joined
Mar 20, 2009
Messages
63
Location
Ontario, Canada
i want to make something like this:

:D 12 :)) 9 :mad: 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?
 
Top Bottom