Objective-c string not working -


hi im new objective c , have question. here code...

ccscene *restartscene = [ccbreader loadasscene:@"levels/level%d",_currentlevel]; 

basically when level loads want load ever level value of _currentlevel is, getting error saying "too many arguments method call, expected 1,have 2". making noob mistake in advance.

loadasscence needs string argument. have construct string:

ccscene *restartscene = [ccbreader loadasscene: [nsstring stringwithformat:@"levels/level%d",_currentlevel]; 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -