I have a problem with my application cocos2d. I do not know how to close a scene. I get this error: You can't run an scene if another Scene is running. Use replaceScene or pushScene instead'
Help me please
Bye bye
I assume, that you are trying to change current scene with
[[CCDirector sharedDirector] runWithScene: newScene];
Use
[[CCDirector sharedDirector] replaceScene: newScene];
or
[[CCDirector sharedDirector] pushScene: newScene];
instead.
replaceScene
will remove previous scene, pushScene
allows you to pop pushed scene later to return to your first scene in the state it was before pushing new scene.
Anyway, in the future you should post the code where you get errors to allow somewho here to be able to understand your problem better.