How to get leaderboard score for current player?

I looked at the runtime function reference and at the client reference. but I can’t seem to find a way do what I need.

Using our current analytics platform I can only “set” a property instead of having a highscore (so the lower value can overwrite a higher value), so I need to know, after submitting a record, what the player’s record is so I can update the analytics (and I can’t use the player’s submitted score since it might be lower than the highest saved score).

It’s a simple common feature so I’m sure I’m missing something, any thoughts or hints?

You can get the current leaderboard record specifically for any given user (or set of users) using the list by friends feature. It’s named that way because it’s intended to power a filtered leaderboard view of just your friends out of a larger leaderboard, but it will accept any user ID including the user’s own.

That aside leaderboard write operations already return the current score in the response, you shouldn’t need to make a follow-up request.

1 Like

Thanks that’s quite useful I’ll use that instead!

Just for confirmation, it will return the current score saved on the server, even if it’s not equal to the submitted score? (e.g. in case the submitted is lower than the current saved)

You can try this yourself, but yes it will return the actual score on the leaderboard for the user.

1 Like

For Me, it always return the first rank player. Ignoring given parameter userID,

@jaggred are you looking at the returned OwnerRecords field?

No! I wasn’t aware. And when using ownerRecords it is working ok. But still owner rank is null so can’t use it right now.

@jaggred please ensure you’re using the latest version of the server, if the issue persists please report back.

On the latest version, it’s working ok. Thanks