I’m using purge scene but I’ve figured out my problem isn’t with the purging/removal of the scene but that I have another error making things operate funny.
This is the error I get in the terminal:
2013-01-10 16:01:03.670 Corona Simulator[388:903] WARNING: Attempting to set property(y) with nil
2013-01-10 16:01:03.670 Corona Simulator[388:903] WARNING: Attempting to set property(x) with nil
which in turn is making it so every time I purge a scene my sprite appears to hover instead of falling to the ground as it should. Not really sure why this is happening but I’ll post the sprite code and maybe you can see where the problem lies.
local data = require("marios").getSpriteSheetData();
local sheet = sprite.newSpriteSheetFromData("marios.png",data);
local set = sprite.newSpriteSet(sheet, 1, 16);
local screen = display.newGroup()
local instance = sprite.newSprite(set);
instance.x = display.contentWidth/70
physics.addBody(instance, {bounce = 0.2, friction = .1})
group:insert(screen)
instance.name = "mario"
instance.angularDamping = 5000
instance.isFixedRotation = true
instance.isAlive = yes
Not even sure if the sprite is the problem being that I don’t have a code line number to reference.
And thanks again Brent for helping me out. You definitely have a special thanks in my credits. [import]uid: 72845 topic_id: 34466 reply_id: 138357[/import]