WA script problem


#1

Hi all!

I’m posting here because my mother language forum is quite desert and i need a pro nerd help XD

Since the release of BfA I’m trying to fix my wa based UI. I’m haveing an issue with one and I have no idea how to fix it because I’m not expert of script. (It’s a part of a huge suite that i suppose to fix exept this one).
When I trigger that aura, I get this LUA error:

[string “–[[ Error in ‘Dr - R - CD Icon Left Timer’…”]:4: attempt to perform arithmetic on field ‘exp’ (a string value)
[C]: in function xpcall' WeakAuras\RegionTypes\Text.lua:171: in functionUpdateCustomText’
WeakAuras\WeakAuras-2.7.7.lua:3962: in function <WeakAuras\WeakAuras.lua:3956>

The script in the WA is the following:

function(e, state, _, _, _, exp1, exp2, exp3)
if state == 7 then
aura_env.exp = exp3
return true
end
aura_env.exp = nil
return false
end

I suppose there is something wrong here but I have no clue where. In Legion everything was right but in BfA everything changed. Can someone tell me how I can fix this?

Thanks a lot ^^

(If I have to provide more infos, just ask)


#2

Hi,
please post the complete WA as an export string.

The error message states, that exp was used in an arithmetic but the code you copied doesn’t include any arithmetic operation.

Regards


#3

here you are :slight_smile:

!TJvBtQnos4)ltvxTWLalyMxtvzRcgGjmhlmfgYKPUCglSLbLySPKmeiFW)2VUBzJThWBs(W(TDNSy52TEuR(vP2QP1ulZ1wMU4)GHHBJ8fbClZXZMoCWOEwMSTrRcLJ3ejcdualraNc1gF2HP89Wl)lhltNTQOW16392g4G8wPASDYFpMos4fBZ2kzZ5b7QZ3Vj2(9Vp2oq4hBhTIhKXy6FsE0wzqS9fxK9nUVIN9fp)WqzLIGwl2(bE0uXAELQvZnXa34hPFk)plZdJ98u8iRrggWMpWb28pfkcGD299gnT3K872zBCzrGYABYtqxfUMfjCEw4gTYYSn8ULPWjmWQJLzKuSCjxIkXrKEpHaouYbJWTGQf2iO2JEzjpGlfoMRc)2yGIIE2g0U7W1mqaYeAhaemD5QOzfOOLYb4ANztQxVEofs2OuT5r9ikZ)qLvQkBXwpVZlKQnCF)rS1WqZvm3WVfBpH75ZD07r12f8D8GONKCpXEGNN6nCiOxoSH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36(y)NV6rxJ)dQe2XLQSRvPB5w)BV96RURXD3E1Lxd)NbbzlS3BL9Lw40azsx(XLRyrO7px3lfYrx3N5ufyIK1z80PJ)tTv5(mba)Nb9BbGX(5yzAuVzR6W2Fhq8sdKU1)p

As written above, it is a part of a huge suite.


#4

Try to convert exp3 to a number with tonumber(). It is possible that the type conversion was done in another part of your suite or it was an internal change of Weakauras.

function(e, state, _, _, _, exp1, exp2, exp3)
    if state == 7 then
        aura_env.exp = tonumber(exp3)
        return true
    end
    aura_env.exp = nil
    return false
end

#5

Thanks!
I fixed it and i didn’t get the bugsak message anymore even if i’m still having issues on other auras of the suite :\

Manaleaf UI was great but too nerdy to be fixed by a noob like me XD