ios - Cocos2d: .plist file giving me a SIGABRT error -
hello making side scrolling cocos2d app. using .plist file of data in game. when run code gives me sigabrt error. new objective c , cocos2d , not experienced .plist files. .plist file.
this code pretty sure causing problem.
nsstring *path = [[nsbundle mainbundle] bundlepath]; nsstring *finalpath = [path stringbyappendingpathcomponent:@"gamedata.plist"]; nsdictionary *plistdata = [nsdictionary dictionarywithcontentsoffile:finalpath]; nsmutablearray* characterarray = [nsmutablearray arraywitharray:[plistdata objectforkey:@"characters"]]; nsdictionary *thecharacterdict = [nsdictionary dictionarywithdictionary: [characterarray objectatindex:0]]; nsdictionary* characterdict = [nsdictionary dictionarywithdictionary:[thecharacterdict objectforkey:@"playerproperties"]]; character = [character createwithdictionary:characterdict]; [self addchild:character z:kcharacterlevel];
i not know if code causing problem. post more code if needed.
okay don't know if causing error, spotted error in code. nsmutablearray* characterarray
asterisk should before characterarray
.
as read further, there several minor errors in code posted. asterisks in wrong places there many spaces in areas. suggestion read through code line line catch such errors.
Comments
Post a Comment