steam_download_scores_around_user

Download a range of scores from a leaderboard, centered around the user position.

Syntax:

steam_download_scores_around_user(lb_name, range_start, range_end);


Argument Description
lb_name The name of the leaderboard that you are downloading the scores from (a string).
range_start The start position within the leaderboard.
range_end The end position within the leaderboard.


Returns: Real


Description

This function is used to retrieve leaderboard entries relative the current users entry. The range_start parameter is the number of entries to retrieve before the current users entry, and the range_end parameter is the number of entries after the current user's entry, and the current user's entry is always included in the results. For example, if the current user is number 5 on a given leaderboard, then setting the start range to -2 and the end range to 2 will return 5 entries: 3 through 7. If there are not enough entries in the leaderboard before or after the user's entry, Steam will adjust the range to try to return the number of entries requested. For example, if the user is #1 on the leaderboard, start is set to -2, and end is set to 2, Steam will return the first 5 entries in the leaderboard.


Example:

score_get = steam_download_scores_around_user("Game Scores", -4, 5);

This will send off a request to the Steam Server for a range of 10 scores from the leaderboard "Game Scores", centered on the player and will store the async id of the request in the variable "score_get". This will then be handled in the Steam Async Event, as shown in the Extended Example for steam_download_scores.


Back: Steam API
Next: steam_download_friends_scores
© Copyright YoYo Games Ltd. 2018 All Rights Reserved