I suspect this is something really simple, but I'm trying to get an int that I have stored in a dictionary and the line I'm using is this..
int mapX = [NSNumber numberWithInt:[templateObject valueForKey:@"mapX"]];
But it's giving me the error...
Incompatible pointer to integer conversion sending 'id' to parameter of type 'int'
and
Incompatible pointer to integer conversion initializing 'int' with an expression of type 'NSNumber *';
If I try...
NSNumber *mapX = [NSNumber numberWithInt:[templateObject valueForKey:@"mapX"]];
I basically get the same error. I know I'm probably just using the wrong syntax, but I'm not sure how else to write it.
Thanks for any help.