View Single Post
11-18-15, 06:21 PM   #5
Darsyek
A Murloc Raider
Join Date: Nov 2015
Posts: 5
Code:
function(unit, cache, textframe)
if UnitPowerType("player") == 0 then
    local z = math.max(0, UnitPower("player")) / math.max(1, UnitPowerMax("player")) * 100;
    return string.format("%.f", z) .. "%%";
else return UnitPower("player") end
That is the exact code from my original post. You can even go read the code from the original post. I haven't even edited it, it's exactly as it was when I posted it in the first place. Note the last line again: else return UnitPower("player") end. Like I said, my original code does have an end statement - at the end of the else statement. Changing what line the end statement is on makes no impact on its function (or lack thereof). Stuf Unit Frames also doesn't display any LUA errors when you're using custom code. It seems to suppress it, otherwise I'd be looking through the error logs myself.

Last edited by Darsyek : 11-18-15 at 06:25 PM.
  Reply With Quote