Ios 有没有办法把int值存储在objectscore中?

Ios 有没有办法把int值存储在objectscore中?,ios,objective-c,xcode,game-center,Ios,Objective C,Xcode,Game Center,我正在尝试将Gamecenter集成到我的应用程序中,但似乎无法使其正常工作: - (void) reportScore { GKScore *score = [[GKScore alloc] initWithLeaderboardIdentifier:@"High_Scores_LeaderBoard"]; [GKScore reportScores:@[score] withCompletionHandler:^(NSError *error) { if (error != nil

我正在尝试将Gamecenter集成到我的应用程序中,但似乎无法使其正常工作:

- (void) reportScore {
GKScore *score = [[GKScore alloc] initWithLeaderboardIdentifier:@"High_Scores_LeaderBoard"];

[GKScore reportScores:@[score] withCompletionHandler:^(NSError *error) {
    if (error != nil) {
        NSLog(@"%@", [error localizedDescription]);
    }
}];
}

我使用上述方法向gamecenter报告分数。但是,我将分数存储在以下整数中:

extern int g_nScore;
有没有办法将g\u nScore存储为GKScore,以便运行上述方法?

,这是一个“
int64\u t

为什么不将“
分数
”对象的“
”属性设置为“
g\u nScore