xcode4.5 - Cocos2D Score Counter will not count score -
i making game in cocos2d. made score counter on screen, , when hit enemy adds point score. when run it, , when hit enemy project terminates.
it because of this: format specifies type 'id' argument has type 'int', referring line of code:
- (void)addpoint { score = score + 1; // score++; work. [scorelabel setstring:[nsstring stringwithformat:@"%@", score]]; }
it says wants me replace @"%@" @"%d", because not make score work, please me fix this.
thank you!
yes, replace %@ %d. score integer, question has answer..why asked here?
[scorelabel setstring:[nsstring stringwithformat:@"%d", score]];
Comments
Post a Comment