I am getting an error in r43, line 307, from comparing a number to nil. I believe this line should be changed from
if resCasting[target] > 1 then
to
if resCasting[target] and resCasting[target] > 1 then
Also, it looks like line 319 should be changed from
resCasting[guid] > 0 then
to
if resCasting[guid] and resCasting[guid] > 1 then