I have a function
-(void) generateLevelFromPlist:(int)currentLevel{
NSString *mainPath = [[NSBundle mainBundle] bundlePath];
itemPositionPlistLocation = [mainPath stringByAppendingPathComponent:@"levelconfig.plist"];
NSDictionary * itemPositions = [[NSDictionary alloc] initWithContentsOfFile:itemPositionPlistLocation];
NSNumber *xVal = [[[[itemPositions objectForKey:@"level + STRING/NUMBER"]objectForKey:@"hexposition"]objectForKey:@"hexagon1"]objectForKey:@"xVal"];
int generatedXVal = [xVal integerValue];
NSLog(@"%d", generatedXVal);
NSLog(@"%@", itemPositionPlistLocation);
}
where I want to add the variable currentLevel to the string "level" as in objectForKey:@"level + STRING/NUMBER"
How do I do that ?