Putting addbody within a condition statement produces an error:
if xxx == yyy then
physics.addBody(image3, {density=1.0, friction=0.3, bounce=0.6} )
end
Runtime error
…K2E+++TI/-Tmp-/TemporaryItems/525/scene05_Game01.lua:468: ERROR: table expected. If this is a function call, you might have used ‘.’ instead of ‘:’
stack traceback:
[C]: ?
[C]: in function ‘addBody’ [import]uid: 6288 topic_id: 19871 reply_id: 319871[/import]