I'm having a bit of trouble with requesting a rank for a particular score. It was my understanding that the function simply looked up a particular score in a certain category and returned what rank/pos it would be...but I keep getting a rank of 0 or 1. Here is my code...
-(void)RequestRank
{
ScoreServerRequest *request = [[ScoreServerRequest alloc] initWithGameName:@"APT" delegate:self];
NSString *cat = @"10 Rounds";
switch([GlobalDataManager sharedDataManager].gametype)
{
case 1:
cat = @"10 Rounds";
break;
case 2:
cat = @"20 Rounds";
break;
case 3:
cat = @"40 Rounds";
break;
}
// Get rank of current score for display, before saving
[request requestRankForScore:[GlobalDataManager sharedDataManager].playerScore andCategory:cat];
[request release];
}
-(void)scoreRequestRankOk:(id)sender
{
int rank = [sender parseRank];
lbl_Rank.text = [NSString stringWithFormat:@"%@%d%@%d", @"Score: ", [GlobalDataManager sharedDataManager].playerScore, @" Rank: ", rank];
}
Not sure what could be going wrong here, unless the requestRankForScore function does something different than I think it does.
NOTE: The score I am looking up has not been submitted to the server so maybe that is causing the issue. Basically on the Enter-Your-Name screen I'm displaying the players score and what their "rank" would be if they submitted. Thus I am trying to find out what rank their score would be listed as before they submit.
Thanks