Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by Jakub Smekal · Mar 02, 2021 at 10:54 AM · Leaderboards and Statistics

Position of user when calling GetLeaderboardAroundPlayer without the statistic isn't always 0

I'm calling GetLeaderboardAroundPlayer for user who doesn't have the corresponding statistic in leaderboard, but his position equals to 1 instead of 0, as stated by this:

Note: When calling 'GetLeaderboardAround...' APIs, the position of the user defaults to 0 when the user does not have the corresponding statistic.

This is the content of a leaderboard:

Unity output after calling GetLeaderboardAroundPlayer:

GetLeaderboardAroundPlayer - position: 1, stat. 0, name: guest654032
8dxx2.png (21.2 kB)
Comment

People who like this

0 Show 2
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sarah Zhang · Mar 03, 2021 at 02:30 AM 0
Share

We cannot reproduce this behavior in our testing title, could you please provide the TitleId for us to investigate?

avatar image Jakub Smekal Sarah Zhang · Mar 03, 2021 at 08:45 AM 0
Share

Our TitleId is 4AA30. I also managed to reproduce this issue step by step:

1. Add player A to the leaderboard

2. Add player B to the leaderboard with higher stat value than player A

3. Reset the leaderboard

4. Add player B to the leaderboard again, with same value as before

5. Call GetLeaderboardAroundPlayer for player A

For me, this outputs 1 instead of 0, as if it still considered the player to be there even after the leaderboard reset.

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Sarah Zhang · Mar 09, 2021 at 01:54 AM

Thanks for the clarification, we found that player that has no corresponding statistics would have the value that is 0, the position would not be 0. If you want to distinguish if a player has some statistic or not, we would suggest you use the API GetPlayerStatistics.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Unity - UpdatePlayerStatistics followed by GetLeaderboardAroundPlayer 1 Answer

    Leaderboards AvatarUrl and LinkedAccounts are always Null. 2 Answers

    Update Player Statistic with decimal number value causes cryptic error 1 Answer

    Significant delay in leaderboard updates 1 Answer

    Not all my leaderboards were reset 3 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges