Open srinivaassunil opened 8 years ago
Can you share an unfiltered log (this one only has the Unity category). There is an error:
11:59:09 +05:30 WARNING: Error returned from fetch: ERROR_INTERNAL
In your callback, you need to check data.Valid
before accessing the contents.
Thank you for responding. Here is the full log file (without filter).And one more thing only the last loadscore method is working ie. if i write four load score methods one after another to fetch score from four different leader boards only the last one is working.
Point is that I have to get all n player scores from n different leader boards .What is the best way to do it?
Thanks - I'll take a closer look.
try to fetch scores from different leader boards sequentially
public void FetchScore(string LID) {
if (Social.localUser.authenticated)
{
try
{
PlayGamesPlatform.Instance.LoadScores(
LID,
LeaderboardStart.PlayerCentered,
1,
LeaderboardCollection.Public,
LeaderboardTimeSpan.AllTime,
(LeaderboardScoreData data) => {
res = data.PlayerScore.formattedValue;
Debug.Log("player score at `leaderboard` is " + data.PlayerScore.formattedValue + "---" + LID);
});
}
catch (System.Exception e)
{
Debug.Log(e.StackTrace);
}
}
else {
Debug.Log("failed to sync LB");
}
}
FetchScore(LID1);
FetchScore(LID2);
FetchScore(LID3);
How to solve it
new Thread(() => FetchScore(LID1)).Start();
new Thread(() => FetchScore(LID2)).Start();
new Thread(() => FetchScore(LID3)).Start();
Nice description of the issue and the workaround! We'll make sure to incorporate this into a future release.
Thank you @claywilkinson .
Hi there, I have 4 leader boards in my game and i wanted to fetch all current player scores and apply them locally so that scores are in sync across all devices bearing same account.When i request score from any one of the leader boards ,it is working fine but when i try to fetch them all sequentially it resulted in the following error.
This is what i did(c# code)
This gives an error.Anyone could you please help!.
Thanks in Advance LOG FILE: sllog.txt