I have a weakaura for Guard and Stagger to return how much damage I'm staggering or absorbing with guard and I keep getting these errors and not sure how to fix em.
Guard: [string "retrun function () local name,_,icon,_,_,_,...."]:1: attempt to compare number with nil
Here's the custom lua I'm using for Guard under display:
Code:
function () local name,_,icon,_,_,_,_,_,_,_,_,_,_,_,value=UnitBuff("player", "Guard"); if(value > 999) then value = math.floor(value/1000) .. "k" end; return(value) end
Stagger: [string "return function() local stagger = select(15..."]:1: attempt to compare number with nil
Here's the custom lua I'm using for Stagger under display:
Code:
function() local stagger = select(15, UnitAura("player", "light stagger", nil, "HARMFUL")) or select(15, UnitAura("player", "moderate stagger", nil, "HARMFUL")) or select(15, UnitAura("player", "heavy stagger", nil, "HARMFUL"));if(stagger > 999) then stagger = math.floor(stagger/1000) .. "k" end;return stagger; end
Anyone know how to fix these errors?