WeakAuras

WeakAuras

206M Downloads

Broken aura prevents access to options

Urtgard opened this issue ยท 5 comments

commented

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:

commented
  1. Import this aura: https://wago.io/H1irh5Zv7
  2. Change Custom Trigger to: function() return true end
  3. 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
  1. Change trigger settings to this:
    image
commented

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

commented

On current alpha version of WeakAuras following your steps works without errors.

commented

Can confirm it, no errors with current alpha.

commented

Hey, can you explain step by step how you make the bugged aura?