Search Unity

Game Center "Saving Failed Score to archive" problem.....???

Discussion in 'Scripting' started by Niki.j, Sep 6, 2013.

  1. Niki.j

    Niki.j

    Joined:
    Oct 17, 2012
    Posts:
    157
    Hello,

    I am facing the same problem with the leader board.
    My code is here:

    Code (csharp):
    1.  
    2. function OnGUI()
    3. {
    4.         if(GUI.Button(Rect(sw/1.93f,sh/2.25f,sw/3.5f,sh/9.0f),""))
    5.     {
    6.         if(!GameCenterBinding.isPlayerAuthenticated())
    7.             AuthenticateGameCenterUser();
    8.         else
    9.         {
    10.             GameCenterBinding.reportScore(PlayerPrefs.GetInt("_kHighScore"), "iTS_LeaderBoard123");//LeaderBoard Id
    11.             GameCenterManager.categoriesLoaded += HandleGameCenterManagercategoriesLoaded;
    12.             isHighScoreClicked = true;
    13.         }
    14.     }
    15.         if(isHighScoreClicked)//Game Center Integration
    16.     {
    17.         if(!GameCenterBinding.isPlayerAuthenticated())
    18.             AuthenticateGameCenterUser();
    19.         else
    20.         {
    21.             GameCenterBinding.loadLeaderboardTitles();
    22.             GameCenterBinding.showLeaderboardWithTimeScope( GameCenterLeaderboardTimeScope.AllTime );
    23.         }
    24.     }
    25. }
    26.  
    27. function HandleGameCenterManagercategoriesLoaded (System.Collections.Generic.List<GameCenterLeaderboard> obj)
    28. {
    29.     isHighScoreClicked = false;
    30. }
    31.  
    32. function AuthenticateGameCenterUser()
    33. {
    34.     GameCenterBinding.authenticateLocalPlayer();
    35. }
    36.  
    37.  

    With this code i can see the leader board but there i am getting an error in my console i.e. "saving failed score to archive", do any one have any idea regarding this problem...:confused:.???

    Thanks in advance!
    Niki.j