I have spent many hours trying to find a solution, so if it IS here somewhere and I missed it I am sorry ...
In .h
@property (nonatomic, strong) NSArray *physicalMan;
-(int) getManeuverRating:(int *) value;
In .m
physicalMan = [[NSArray alloc] initWithObjects:@"Grip-Hold", @"Strike", @"Fall", @"Response", nil];
NSLog(@" The second element is: %@", [physicalMan objectAtIndex:1]);
NSLog (@" This is the index location of Grip-Hold: %i", [physicalMan indexOfObject:@"Grip-Hold"]);
[self getManeuverRating:[physicalMan indexOfObject:@"Grip-Hold"]];
}
-(int) getManeuverRating:(int *) value
{
int a = *value;
return a + 1;
}
The NSLogs work fine with the proper values, which is why I am so confused as to why the function will not work. The compiler warning says "Incompatible integer to pointer conversion sending 'NSUInteger' (aka 'unsigned int') to parameter of type 'int *'" I have tried removing the * and I have tried to find other data types, and converting data types, and I cannot get anything to work correctly. Please help or point me in the right direction ... what am I doing wrong? what am I missing?