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 function UpdateCustomText’
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?
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