Hmm, same error again? It must behave different to Pitbull's Lua Text. Maybe it needs an extra return.
Code:
local _, pToken = UnitPowerType(unit)
local pCur, pMax = Power(unit), MaxPower(unit)
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