I'm sorry but I'm missing something crucial here..
I'm trying to impliment a similar feature into my UI addon, but
Code:
local _, _, _, _, _, duration, expirationTime = UnitAura(PlayerFrame.unit, index, filter)
if duration > 0 and expirationTime then
-- This aura has a duration:
BuffStatusBar:SetMinMaxValues(expirationTime - duration, expirationTime)
else
-- This aura doesn't have a duration:
BuffStatusBar:SetMinMaxValues(0, 1)
BuffStatusBar:SetValue(1)
end
gives me an error saying
Code:
if duration > 0 and expirationTime then
is trying to compare a number to a nil.
I have everything else working except this.