★ TouchArcade needs your help. Click here to support us on Patreon.

Game Center score submission not working

08-12-2012, 07:34 PM
#1
Joined: Dec 2011
Posts: 12
Game Center score submission not working

Game center authenticates my user correctly and can display leaderboards, however when i try to submit my score it does not cooperate.

When the gaming session is over, I call this function...


Quote:
- (void) submitHighScore

{

[self.gameCenterManager reportScore: highScore forCategory:@"highscores"];

}
I go to leaderboards and there's nothing.

Any suggestions???
08-15-2012, 12:49 PM
#2
Joined: May 2009
Location: Las Vegas, NV
Posts: 51
Send a message via AIM to JustinFic
Leaderboards don't show anything until they get at least two scores in them.

Dojotron
Current Project: Shatter Alley
08-15-2012, 04:28 PM
#3
We'd really need to see more code than that to help. The Game Kit libraries for this (hidden inside your manager class) return error messages if there is a failure. Have you looked at those?
08-20-2012, 12:17 AM
#4
Joined: Feb 2012
Posts: 24
Quote:
Originally Posted by JustinFic View Post
Leaderboards don't show anything until they get at least two scores in them.
Not just two scores. It needs two scores from two different player IDs.

To test it, you need to create two GameCenter login IDs.

What I would do is use one ID to post an initial score, then just use the other
ID for testing as usual. There's no need to swap IDs back and forth.
08-22-2012, 04:36 PM
#5
We would really need to see more of your code to diagnose what is going on. is "highscore" an instance variable? How does that get updated? and if it isnt an instance variable then its very likely that its getting passed as null. Have you tried to NSLog the value of the high score to see what it is sending?