question

saudahmed020 avatar image
saudahmed020 asked

Why DisplayName from leaderboard is null?

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");

        });

            

    }

Leaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

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.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

saudahmed020 avatar image saudahmed020 commented ·

Thank you very much!

0 Likes 0 ·
VU VIET DUNG avatar image
VU VIET DUNG answered

same problem

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

VU VIET DUNG avatar image
VU VIET DUNG answered

same problem

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.