ball:addEventListener( “touch”, dragBody ) – make object draggable
end
end
Runtime error
/Users/andrew/Dropbox/Manual Bouncing Ball/main.lua:56: ERROR: table expected. If this is a function call, you might have used ‘.’ instead of ‘:’
stack traceback:
[C]: ?
[C]: in function ‘addBody’
/Users/andrew/Dropbox/Manual Bouncing Ball/main.lua:56: in function
?: in function <?:214>
Line 50 is the introduction local function spawnBall
Line 56 is physics.addBody
Any help will be appreciated I am stuck.
[import]uid: 41573 topic_id: 7246 reply_id: 307246[/import]
Thank you very much for your help, I fixed the problem and the same error came up again. Any other problems people can find.
[import]uid: 41573 topic_id: 7246 reply_id: 25479[/import]
ball:addEventListener( “touch”, dragBody ) – make object draggable
end
end[/lua]
the ball table referenced on line 6 doesn’t seem to be created in this function. is ball a global or something? [import]uid: 33520 topic_id: 7246 reply_id: 26050[/import]