Here's my current code that's still throwing the error every frame for trying to index aura:
http://pastebin.com/Prhi0c52
and this is the error:
http://pastebin.com/5SJTJFPB
I've commented several things in the UpdateBars function as well as in the UpdateBuff function to see if there's a disconnect in the order.
This is the if statement the error is in:
Lua Code:
if statusbar.aura.noTime then --BuffBars.bars[i].statusBar.aura.noTime
statusbar.spelltime:SetText() --BuffBars.bars[i].statusBar.spelltime
else
local timeleft = statusbar.aura.expirationTime - timenow ----BuffBars.bars[i].statusBar.aura.expirationTime
statusbar:SetValue(timeleft) --BuffBars.bars[i].statusBar
statusbar.spelltime:SetText(FormatTime(timeleft)) --BuffBars.bars[i].statusBar.spelltime
end
Compared to:
Lua Code:
local bar = bars[i] --BuffBars.bars[i]
local statusbar = bar.statusBar --BuffBars.bars[i].statusBar
local buff = buffs[i]
bar.aura = aura --BuffBars.bars[i].aura
if buff.noTime then --buffs[i].noTime