#Absorb Shield weakaura doesn't work anymore

21 messages · Page 1 of 1 (latest)

swift turret
#
function() 
    local absorbAmount = select(16,WA_GetUnitBuff("player",GetSpellInfo(17))) --spell id 17 = power word shield
    --print(absorbAmount)
    if absorbAmount then 
        absorbAmount = absorbAmount / 1000
        return string.format("%i%c",absorbAmount,75) -- 75 here is the ascii code for K
    else
        return ""
    end 
end 
candid sonnet
#

!bugsack

flat thornBOT
#

If you are having errors we need a copy of the entire error's text to be able to help.
See this message #pins message for details on getting detailed Lua errors

candid sonnet
#

But use a default trigger 👍

swift turret
#
20442x Lua error in aura 'PW:S': Custom Text Function
WeakAuras Version: 5.16.1
Aura Version: 1.0.3
Stack trace:
[string "return function() "]:2: attempt to call global 'GetSpellInfo' (a nil value)
[string "return function() "]:2: in function <[string "return function() "]:1>
[string "=[C]"]: in function `xpcall'
[string "@WeakAuras/WeakAuras.lua"]:4876: in function `RunCustomTextFunc'
[string "@WeakAuras/SubRegionTypes/SubText.lua"]:330: in function `?'
[string "@WeakAuras/SubscribableObject.lua"]:94: in function `Notify'
[string "@WeakAuras/WeakAuras.lua"]:4614: in function <WeakAuras/WeakAuras.lua:4609>
[string "@WeakAuras/WeakAuras.lua"]:4701: in function <WeakAuras/WeakAuras.lua:4667>
[string "@WeakAuras/WeakAuras.lua"]:4811: in function `UpdatedTriggerState'
[string "@WeakAuras/WeakAuras.lua"]:4531: in function `UpdateFakeStatesFor'
[string "@WeakAuras/WeakAuras.lua"]:4504: in function `FakeStatesFor'
[string "@WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua"]:1539: in function `SyncVisibility'
[string "@WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua"]:1565: in function `PriorityShow'
[string "@WeakAurasOptions/WeakAurasOptions.lua"]:728: in function <WeakAurasOptions/WeakAurasOptions.lua:697>

Locals:
(*temporary) = 16
(*temporary) = "player"
(*temporary) = nil
(*temporary) = 17
(*temporary) = "attempt to call global 'GetSpellInfo' (a nil value)"
candid sonnet
#

Can easily get absorbs from the tooltip, and can also do the formatting however you want

#

And it'll never break

#

GetSpellInfo doesn't exist anymore

#

!deprecated

flat thornBOT
#

With The War Within many functions of the API were deprecated, follow these links for more information 11.0.2 11.0.0

swift turret
#

think i have this issue with GetSpellInfo in alot of weakauras

candid sonnet
#

Really, just use a default trigger. Easier, less worries

swift turret
#

ok how do i get that i thought it was %tooltip.1?

candid sonnet
#

If you click "fetch tooltip info" in the aura trigger, then yes

#

%tooltip1 or 2 or 3

#

%tooltip1 is the first number in the tooltip, and so on.

swift turret
#

can i divide this by 1000 directly here?

candid sonnet
#

You can click on the ⚙️ to format numbers

#

And yeah that's an option IIRC

swift turret
#

wonders

#

thanks man