Hello,
I created a convenience function to remove display objects:
function removeDisplayObject(obj) display.remove(obj) obj = nil end
However, when I call the function on a display object…
removeDisplayObject(a) if (a == nil) then print "object is nil" else print "object is not nil" end
… the display object passed to the function isn’t being set to nil. Anyone know why? My goal is to properly remove a display object with a single code statement.
Thanks!
John