I seem to have a problem with ‘if object ~= nil’
Basically I have a function that removes objects as and when I need, in this function all objects that I wish to have removed look exactly like this:
if bossGroup ~= nil then
bossGroup:removeSelf()
bossGroup = nil
end
Yet I get a console error:
ERROR: Attempt to remove an object that’s already been removed from the stage or whose parent/ancestor group has already been removed.
And it points to certain objects (but not all) within my remove function list. However if I’m stating ‘if object is not equal to nil’, why would I still be getting the error? [import]uid: 107915 topic_id: 34934 reply_id: 334934[/import]