Thread: Stuf + Threat
View Single Post
06-10-11, 05:22 AM   #20
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Lily.Petal View Post
Well it's not giving me an error, it's just not showing up at all. I don't really understand it.
Debug time! Hmm, I wonder if print works in Lua Text Is fast update ticked?

Code:
local _, pToken = UnitPowerType(unit)
local pCur, pMax = Power(unit), MaxPower(unit)

print(unit)
print(pCur)
print(pMax)

if pMax > 0 then
	if pToken == "RAGE" or pToken == "RUNIC_POWER" then
		-- Warrior / Teddy Bear Druid / DK
		if pCur > 0 then
			return "%d", pCur
		end
	else
		-- Everything else
		local pPer = ceil(pCur / pMax)
		if pPer < 100 then
			return "%d", pPer
		end
	end
else
	return ""
end
  Reply With Quote