Originally Posted by Dawn
Seems to be an error in the health function for pets. Try to out-comment line 94 (put -- in front of it) and see if the error message still shows up. If it doesn't you can copy and paste a line from player (or something else that works), in there.
Notepad++ is a free editor that shows line numbers.
|
I did as you said and it started throw up all kinds of errors, all of them are within a the following scripts.
I really like these frames and I would hate to stop using them because of this.
I would really appreciate any help with this if anyone can see a problem here.
Code:
local updateHealth = function(self, event, unit, bar, min, max)
local perc = floor(min/max*100)
if(not UnitIsConnected(unit)) then
bar:SetValue(0)
bar.value:SetText('|cffD7BEA5'..'Offline')
elseif(unit == 'targettarget') then
bar.value:SetText()
elseif(UnitIsDead(unit)) then
bar.value:SetText('|cffD7BEA5'..'Dead')
elseif(UnitIsGhost(unit)) then
bar.value:SetText('|cffD7BEA5'..'Ghost')
elseif(self:GetAttribute('unitsuffix') == 'pet' or self:GetAttribute('unitsuffix') == 'target')then
bar.value:SetText()
elseif(min==max) then
bar.value:SetFormattedText(ShortValue(min))
else
if(deficit)then
bar.value:SetFormattedText('|cffff3333'.. ShortValue(min-max).. "|cffffffff | " ..perc)
else
bar.value:SetFormattedText(ShortValue(min).. " | " ..perc)
end
end
end