Hi, Im doing something like this:
I press the button and spawn an object1… On the scene are others objects and if spawned object1 collide with other object2 then:
Im spawed new object3 on Object2.x and Object2.y
Object2 will remove self…
Works without problems… but:
I need to add physics body to Object3 … If I try it in collision function, simulator will crash with bus error 
So I put code for adding body out of the collision function and get:
Runtime error
/Users/HP6/Desktop/HB 17.9.2011/level2-1.lua:422: ERROR: table expected. If this is a function call, you might have used '.' instead of ':'
But in line 422 I have ‘.’ instead of ‘:’ …
physics.addBody(object3, {density=4, friction=3, bounce=0})
I found this:
http://developer.anscamobile.com/forum/2011/05/26/bus-error
But if I do it with timer simulator still crashing when adding physics body…
What can be wrong?
Thanks.
P.S. : Sorry for my English, Hope you can understand
[import]uid: 59968 topic_id: 15235 reply_id: 315235[/import]
[import]uid: 59968 topic_id: 15235 reply_id: 56273[/import]
[import]uid: 59968 topic_id: 15235 reply_id: 56693[/import]