Broken aura prevents access to options
Urtgard opened this issue ยท 5 comments
I tried to change an aura to not using OnUpdate triggers but I failed and couldn't access the options anymore.
A reload didn't help. Only deleting the aura from the saved variables helped.
The aura: https://pastebin.com/kbEe8hRn
Chat says: Options will finish loading after the login process has completed.
And I get these 3 Errors:
- Import this aura: https://wago.io/H1irh5Zv7
- Change Custom Trigger to:
function() return true end
- Copy this to stack info
function()
local azeriteItemLocation = C_AzeriteItem.FindActiveAzeriteItem()
if not azeriteItemLocation then return end
local azeriteItem = Item:CreateFromItemLocation(azeriteItemLocation)
local xp, totalXP = C_AzeriteItem.GetAzeriteItemXPInfo(azeriteItemLocation)
--for showing the current AzeritLevel of your neck
--local currentLevel = C_AzeriteItem.GetPowerLevel(azeriteItemLocation)
local xpToNextLevel = totalXP - xp
local percent = 0
if xp > 0 then percent = floor((xp / totalXP) * 100) end
local thousandSeperators = function(v)
if v <= 999 then
return v
else
return format("%.3f", v/1000)
end
end
--ret = string.format("%slvl %s%% %s", currentLevel, percent, xpToNextLevel)
ret = string.format("%s / %s (%s%%)", thousandSeperators(xp), thousandSeperators(totalXP), percent)
return ret
end
it should be guarded against, but you must return a number in stacks. not a string
https://github.com/WeakAuras/WeakAuras2/wiki/Dynamic-Information#stack-info