- Home /
'No Score' on Game Center Leaderboard
I have been trying to submit scores for the last couple of days to no avail.
It authenticates gamecenter and welcomes me back, says in the Debug Console that it successfully reported a score, but "no Score" always pops up every time I check the boards.
I have logged in with 3 different sandbox accounts who are all friends. The game comes up in the list of games on games center but it also says "Never Played" and "Not Ranked" on the leaderboards.
I've checked the box to enable gameCenter:
Here's my leaderboard setup:
this is my code for reporting (almost pulled word for word from the documentation):
void SetHighScore(int highScore)
{
if(Social.localUser.authenticated)
ReportScore(highScore,"High_Scores");
}
void ReportScore (long score, string leaderboardID) {
Debug.Log ("Reporting score " + score + " on leaderboard " + leaderboardID);
Social.ReportScore (score, leaderboardID, success => {
Debug.Log(success ? "Reported score successfully" : "Failed to report score");
Debug.Log("New Score:"+score);
});
}
It says reporting successful, but it does that even if I put a completely random leaderboard ID.
I want to Submit an update for my app and this is what is stopping me. If anyone can see errors or give advice I will be grateful.
Have you submitted scores across all three Sandbox ID's? If not, I believe this is a requirement now for scores to show up.
Also, from my own experience, it helped when I friended all Sandbox accounts.
I have friended them all, but still nothing. it says 'never played' on all of them as if they have never logged into game center.
$$anonymous$$aybe because this is an update that I am trying to add gamecenter to and the initial build didn't have it could be the source of the problem, but I have no way to know and it is so frustrating.
I could just submit it to apple with faith that the build is sound and it will work in the 'real' version. Whats the worst that could happen. I get rejected?
Answer by amit-chai · Feb 27, 2014 at 07:26 PM
Debug.Log(success ? "Reported score successfully" : "Failed to report score"); Debug.Log("New Score:"+score); }); Is this C# how to write it in javascript? im getting errors "unexpected tokens :>" What is the "success ? " never saw this structure in a script before...
that is an in-line if statement. if follows the following pattern.
(Statement ? valueIfTrue : valueIfFalse);
for example. bool lLongName = (lUserName.length > 12 ? true : false);
Your answer
Follow this Question
Related Questions
How To Build A Leaderboard Using Unity 3.5 Beta 2 Answers
Social.ShowAchievementsUI() not showing achievements 1 Answer
Understanding the "daily" and "weekly" scopes in Unity.Social & Apple GameCenter Leaderboards 1 Answer
How to get Sandbox mode running on Apple TV? 0 Answers
IOS Game Center Leaderboard not showing scores reported (sandbox) 1 Answer