I have not one but TWO problems! Firstly, in my CheckCollision function, it keeps telling me that I am comparing a number with nil.
What?? I see nothing with a nil value here.
Code: Select all
function CheckCollision(x1, y1, w1, h1, x2, y2, w2, h2)
return
x1 x2+w2 and
x2 < x1+w1 and
y1 < y2+h2 and
y2 < y1+h1
end
Code: Select all
function CheckCollision(x1,y1,w1,h1,x2,y2,w2,h2)
return x1 < x2+w2 and
x2 < x1+w1 and
y1 < y2+h2 and
y2 < y1+h1
end
So what is going on? Is it something else in my code, or what?