I'm trying to make a level select that uses the sender tag and send the scene to level1 scene, level2 scene, and so on. The buttons tags are 1, 2, and so on.
Code:
- (void) LaunchLevel: (id) sender
{
int SelectedLevel = [sender tag];
id SendHere = (@"level%i", SelectedLevel);
[[CCDirector sharedDirector] replaceScene:[SendHere scene]];
}
Why is this not working? Everytime I try to run the app it crashes.