Originally Posted by neverg
From what I can gather from ouF aura.lua, .visibleAuras gives me the current number of Auras (Buffs + Debuffs) visible, is that right?
I'm trying to get its value on my custom PostUpdateIcon function, but everytime I call it, it returns an error.
For example this in my PostUpdateIcon
Code:
i = Auras.visibleAuras
local i=i+i
Returns this error:
Interface\AddOns\oUF_lumen\oUF_lumen.lua:630: attempt to perform arithmetic on local 'i' (a nil value)
Am I getting it wrong? Shouldn't it return an arithmetic value? I think .visibleAuras is a global on oUF right? So I don't need to declare it. I've search for other ouF authors layouts but rarely anyone makes use of this.
Thanks!
|
Is that element really your .Auras element, or is it stored as .Buffs or .Debuffs? The speciallized buff/debuff element versions don't actually set .visibleAuras; They use .visibleBuffs and .visibleDebuffs.
Update code for .Auras element (oUF/elements/aura.lua):
Code:
auras.visibleBuffs = filterIcons(unit, auras, auras.buffFilter or auras.filter or 'HELPFUL', numBuffs, nil, 0, true)
auras.visibleDebuffs = filterIcons(unit, auras, auras.debuffFilter or auras.filter or 'HARMFUL', numDebuffs,true, auras.visibleBuffs)
auras.visibleAuras = auras.visibleBuffs + auras.visibleDebuffs -- Would throw an error before PostUpdate if either were nil
Update code for .Buffs:
Code:
buffs.visibleBuffs = filterIcons(unit, buffs, buffs.filter or 'HELPFUL', numBuffs)