boundingbox collision help
Posted: Thu Jan 30, 2014 7:34 am
Hi
I have copied this function from the wiki but when I run the game I get this error main.lua:107: ')' expected near '.'
I don't get what the problem is
I have copied this function from the wiki but when I run the game I get this error main.lua:107: ')' expected near '.'
I don't get what the problem is
Code: Select all
function CheckCollision(ball.x,ball.y,ball.width,ball.height,player2.x,
player2.y,player2.width,player2.height)
return ball.x < player2.x+player2.width and
player2.x < ball.x+ball.width and
ball.y < player2.y+player2.height and
player2.y < ball.y+ball.height
end