LYQ wrote:Blastitute wrote:I used to have this same thing as a macro, it "worked" while giving false data for weeks, but then suddenly I get this error with the addon aswell:
Interface/AddOns/MorunoRank/core.lua:80:attempt to perform arithmetic on global `CPIo' (a nil value)
this error will occur when CPLast >= 431492 (whatever that is)
the variable CPlo will not be initialized in this case, the author has to include default values for CPup, CPlo, RPup, RPlo in this case - else every one of these variables will cause this error if CPLast is above the mentioned value.
btw: if - elseif structure would be better instead of using tons of if cases.
all vars should be given local values too to prevent taint