Hey Ya’ll I need a little bit of help.
I have a collision issue, so here is what is going on
Add BottomBar to my SceneGroup, Add my FallingItem to my SceneGroup
I spawn FallingItems in a loop.
Falling Item falls and hits the bottom bar and is removed (
using removeSelf() )
Falling Item 2 falls and hits the bottom bar and this error occurs.
Runtime error
…y\skydrive\corona-projects\icreamstoryboard\game.lua:84: ERROR: Attempt to re
move an object that’s already been removed from the stage or whose parent/ancest
or group has already been removed.
stack traceback:
[C]: ?
[C]: in function 'reHandling the unhandled error …y\skydrive\co
rona-projects\icreamstoryboard\game.lua:84: ERROR: Attempt to remove an object t
hat’s already been removed from the stage or whose parent/ancestor group has alr
eady been removed.
Runtime error
…y\skydrive\corona-projects\icreamstoryboard\game.lua:84: attempt to call meth
od ‘removeSelf’ (a nil value)
stack traceback:
[C]: in function ‘removeSelf’
…y\skydrive\corona-projects\icreamstoryboard\game.lua:84: in function
'_listenerHandling the unhandled error …y\skydrive\corona-projects\icreamstor
yboard\game.lua:84: attempt to call method ‘removeSelf’ (a nil value)
[lua]
if event.phase == “ended” then
if (self.myName == “mixin” and event.other.myName ==“oCollisionBarrier”) then
if self ~= nil then
timer.performWithDelay( 10, function() self:removeSelf(); end)
end
end
[/lua]
the First Item always removes fine but the 2nd one crashes.
Any idea why?
Thanks
Larry Meadows