I am getting the implicit conversion loses interger precision warning and need help finding a solution. I have seen similar problems but have not found a solution for my problem yet. This are the integers that are declared...
@property (nonatomic) int64_t score;
NSInteger highscorenumber;
this is whats in my .m file when game over function is called...
if (score > highscorenumber) {
highscorenumber = score;
[[NSUserDefaults standardUserDefaults] setInteger:highscorenumber forKey:@"highscoresaved"];
[self clapsound];
}
else{
highscore.text = [NSString stringWithFormat:@"High Score: %li",(long)highscorenumber];
}
the warning come up in this part
highscorenumber = score;
if i change the highscorenumber to a int64_t the warning comes up here...
[[NSUserDefaults standardUserDefaults] setInteger:highscorenumber forKey:@"highscoresaved"];
The reason i am using int64_t for score is to use GameKit (GameCenter).