Hi. I’m trying to finish my SENT for toybox up. But every time I use it, this error SPAMS in my console:
[lua\includes\extensions\math.lua:218] attempt to compare number with nil
In orange and blue text. I have NO clue how to fix this because the error takes place in a file that isn’t even included with my entity. I found the math.lua in the garrysmod content.fgd, and at line 218, there’s a function. I’ll paste the function.
function math.Approach( cur, target, inc ) inc = math.abs( inc ) if (cur < target) then return math.Clamp( cur + inc, cur, target ) elseif (cur > target) then return math.Clamp( cur - inc, target, cur ) end return target end
Please, I need help. It’s one of the most annoying errors I’ve encountered. Thanks ahead of time.
I searched my code “math.Approach” and I found 3 results. I’ll try to fix them.
Couldn’t fix it. Still need help.