I cant seem to find what would be the problem here…
NSArray *oneMove;
oneMove = [[bestMoves objectAtIndex:i] componentsSeparatedByString:@","];
int from, to;
int temp = [[oneMove objectAtIndex:0] intValue];
from = [temp intValue]/100; //"Invalid receiver type int"
to = [temp intValue]%100; //"Invalid receiver type int"
NSLog(@"%d, %d", from, to);
The thing is: it works and ‘from’ and ‘to’ get the right values but i get warnings at the indicated lines…
anyone knows why and how to fix that? (dont like them warnings when compiling 😉 )
temp is already
intvalue, noNSNumber. So you cannot send an[temp intValue]message to it.Just use
Edit: Here is code that proves it works:
Output is as expected 4, 99.