void GetLeaderBoardTotalScore() { GetLeaderboardRequest r = new GetLeaderboardRequest(); r.MaxResultsCount = 10; r.StatisticName = "Score"; PlayFabClientAPI.GetLeaderboard(r,(result)=>{ foreach(var val in result.Leaderboard) { print(val.DisplayName+" "+val.StatValue); } },(error)=>{ print("Failed to get Leaderboard data"); }); },
Hi Guys!
Following is my code:
val.DisplayName is null. Kindly help me! Thanks in advance!
void GetLeaderBoardData() { GetLeaderboardRequest r = new GetLeaderboardRequest(); r.MaxResultsCount = 10; r.StatisticName = "Score"; PlayFabClientAPI.GetLeaderboard(r,(result)=>{ foreach(var val in result.Leaderboard) { print(val.DisplayName+" "+val.StatValue); } },(error)=>{ print("Failed to get Leaderboard data"); }); }
Answer by Brendan · Mar 15, 2017 at 09:34 PM
Can you please provide the Title ID, Statistic ID, and PlayFab ID of the user in question so that we can test? Offhand, the only time I would expect the DisplayName to be null would be if the player account does not have a Title Display Name set.