The title is pretty self explanatory. I am currently trying to make a cocos2d menu and it compiles flawlessly however it crashes right before fully launching and my log reads this…
+[NSInvocation invocationWithMethodSignature:]: method signature argument cannot be nil'
I don’t know what this means here is my code though
// Standard method to create a button
CCMenuItem *Earth = [CCMenuItemImage itemFromNormalImage:@"1.png"
selectedImage:@"1.png"
target:self
selector:@selector(loadLevel:)];
Earth.position = ccp(160, 0);
CCMenuItem *Mars = [CCMenuItemImage itemFromNormalImage:@"2.png"
selectedImage:@"2.png"
target:self
selector:@selector(loadLevel:)];
Mars.position = ccp(160, 240);
CCMenuItem *Moon = [CCMenuItemImage itemFromNormalImage:@"3.png"
selectedImage:@"3.png"
target:self
selector:@selector(loadLevel:)];
Moon.position = ccp(160, 480);
CCMenu *myMenu = [CCMenu menuWithItems:Earth, Mars,Moon, nil];
[myMenu setPosition:ccp(160,240)];
[self addChild:myMenu z:0];
After adding this my program began to crash. Thanks for any help guys you are the best.
you need to implement loadLevel like this