Nil value for nodes in an instance
Byron-Miles opened this issue ยท 1 comments
Describe the bug
Nil value for postion variables when querying GatherLite:IsNodeInRange(myPosX, myPosY, nodePosX, nodePosY, spellType) in an instance.
To Reproduce
Steps to reproduce the behavior:
- Go to an instance
- Open a chest
Potential Fix
Add a check for nil values, for example:
function GatherLite:IsNodeInRange(myPosX, myPosY, nodePosX, nodePosY, spellType)
if myPosX and myPosY and nodePosX and nodePosY then
local distance = ((((myPosX - nodePosX) ^ 2) + ((myPosY - nodePosY) ^ 2)) ^ 0.5)
return distance < 0.0065
end
return false
end