gpgs.leaderboards.loadScores()

Type String
Return value none
Revision Release 2024.3703
Keywords Google Play Games Services, game network, gpgs
See also gpgs.leaderboards.*
gpgs.*

Overview

Retrieves scores from a specified leaderboard.

Syntax

gpgs.leaderboards.loadScores(params)
params (required)

Table. Contains parameters — see the next section for details.

Parameter Reference

leaderboardId (required)

String. Leaderboard id from which to load scores.

position (optional)

String. Can be one of these: "single" - current player score, "top" - top scores, "centered" - scores around current player score. Default is "top".

friendsOnly (optional)

Boolean. If true - load only scores for the current player's friends.

limit (optional)

Integer. How many scores to load, max and default is 25.

timeSpan (optional)

String. Can be one of these: "all time", "weekly" - scores are reset each week, "daily" - scores are reset daily. Default is "all time".

reload (optional)

Boolean. If true, the data will be pulled fresh, not from a cache.

listener (optional)

Listener. Receives loadScores event.