這是我的編碼,用於獲得本地排名前10的高分但是,調試終止錯誤發生。如何從openfeint獲得本地排名前10的高分
[OFHighScoreService getPageWithLoggedInUserForLeaderboard: theLeaderboardID onSuccess:OFDelegate(self, @selector(_scoresDownloaded:))
onFailure:OFDelegate()];
選擇: -
- (void)_scoresDownloaded:(OFPaginatedSeries*)page
{
NSMutableArray* highscores = nil;
if ([page count] > 0)
{
if ([[page objectAtIndex:0] isKindOfClass:[OFTableSectionDescription class]])
{
highscores = [(OFTableSectionDescription*)[page objectAtIndex:0] page].objects;
}
else
{
highscores = page.objects;
}
}
NSString *userID = [OpenFeint lastLoggedInUserName];
for (OFHighScore* score in highscores)
{
ccColor3B theColor = ccBLACK;
if ([score.user.name isEqualToString: userID]) {
//score now contains the users data... Do what I want with it.
NSLog(@"%d %@ %d", score.rank, score.user.name, score.score);
break;
}
}
}
這是我的控制檯窗口中的錯誤: -
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Levelone canReceiveCallbacksNow]: unrecognized selector sent to instance 0x6af2070'
*** Call stack at first throw:
terminate called after throwing an instance of 'NSException'
但只有一個分數顯示本地設備(前1)。我想要本地設備播放器的前10名,最新問題 – Srinivas 2011-03-12 07:29:35