So my GameLoop (The function which always runs to check for stuff during a game) has been working pretty good.
However I added a line to my loop, and suddenly I get an error saying:
function at line 972 has more than 60 upvalues
My function contains a couple of if statements, but not doing like more than 60 things.
Is this happening because my function contains too many if statements? (There is like about 10)
Most of my if statements are mostly for example:
if var1 == 1 then
var2.x=200
doFunction()
–blaa blaa blaa
end
EDIT: By the way, If I add a print there, i wont get an error

