the asterisk from [CCSprite * spriteWithFile:@"blah.png"]; is not supposed to go in there. just do [CCSprite spriteWithFile:@"blah.png"];
Add sprite
(162 posts) (19 voices)-
Posted 1 year ago #
-
Thanks pablo, I'll try doing that.
Posted 1 year ago # -
Ok, he's an updated picture. IDK what happened, but there's a bunch more errors now.
http://img11.imageshack.us/img11/9896/screenshot20100507at102.pngPosted 1 year ago # -
@Joethemonkey101 u forgot the colon between spriteWithFile and the image
Posted 1 year ago # -
thanks for the help techy!
i'l try that as wellPosted 1 year ago # -
ok thanks, there's only 1 error and 3 warnings now!
here's another screenshot
http://yfrog.com/2gscreenshot20100508at101pPosted 1 year ago # -
Hi,
Is your Instructions interface derived from CCLayer? I noticed the warning you are getting with the [self addChild:help] - your init method is set to a class method, change it to an instance method:
-(id)init
Looks like you have to interfaces with the same name...Try do a clean then a rebuild.
Regards,
StevePosted 1 year ago # -
Hi steve. Thanks for answering.
I'm not really sure what you mean about the interfaces. My classes are " gameplay, about the developers, instructions "
and thanks, i'll change it from +(id)init to -(id)init and see what happensPosted 1 year ago # -
Ok, I have a really weird error now.
http://img52.imageshack.us/img52/5296/screenshot20100508at411.pngPosted 1 year ago # -
Atleast it's only 1 error now.
Posted 1 year ago # -
it means you have 2 files with same name in your target
Posted 1 year ago # -
My target? How do I fix that?
Posted 1 year ago # -
Here's another screenshot...
http://img28.imageshack.us/img28/6156/screenshot20100508at457.pngPosted 1 year ago # -
Well I have a class named Instructions and I have a picture named Instructions. Does that matter?
Posted 1 year ago # -
Previous image shows you are duplicating your class in your instructions and helloworldscene files.
Check that you are naming the classes correctly inside those files, maybe you copied and pasted with out paying attention. :)Posted 1 year ago # -
Where do I go to fix that problem? Sorry, I'm new to cocos2d.
Posted 1 year ago # -
Look at the names of your interfaces defined in those 2 .h files.
That is more like an Objective-c / Xcode problem you have. I really recommend you to read a book / articles on those topics :)
Posted 1 year ago # -
I read a book on app developing but then realized i'd rather learn cocos2d for games. Thanks for your help.
Posted 1 year ago # -
I still can't find what exactly to do.
Posted 1 year ago # -
Here's my HelloWorldScene.m
http://img88.imageshack.us/img88/3810/screenshot20100508at100.pngPosted 1 year ago # -
try changing +(id)init to -(id)init
Posted 1 year ago # -
Techy, that added 4 extra warnings.
Posted 1 year ago # -
oh ok, I am not quite sure then...
Posted 1 year ago # -
The error is telling you there are 2 classes named instructions.
Search for that word an see if you are naming 2 classes the same. Either that or you have added that class twice (maybe you added the file to the game's target AND the cocos2d library target, not sure).Posted 1 year ago # -
i don't know what you're talking about because i only find 1 .h and 1 .m file.
http://img146.imageshack.us/img146/8835/screenshot20100509at926.pngPosted 1 year ago # -
You must be naming 2 classes the same, NOT 2 files.
Do a full project search for the word instruction (CMD + shift + G)
Not really sure that is the problem but you might have 2 @interface Instruction around somewhere.Posted 1 year ago # -
also check you are importing the .h files and not the .m by mistake
Posted 1 year ago # -
Oh wow, I was importing the .m file! Thanks, I changed them and now there's no errors.
Posted 1 year ago # -
Ok I did a search for instruction again. Here's a pic.
http://img691.imageshack.us/img691/9759/screenshot20100509at115.png
Oh and also, when I build and run, I get the menu perfectly fine, but when I click on any of the three buttons, nothing happens. They're supposed to go to either the instructions or about the developers page and show the picture I put as a sprite. Weird though, I don't get any errors.Posted 1 year ago # -
glad you got that working :)
Check the tests, the menutest in particular, to see how these work, you may be mispelling something.Try putting an NSLog inside the function that each menu item is supposed to call to see if they are actually being called.
Posted 1 year ago #
Topic Closed
This topic has been closed to new replies.