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

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -