Type Function
Return value none
Revision Current Public Release (2018.3326)
Keywords Google Play Games Services, game network, gpgs, leaderboards, loadScores
See also gpgs.leaderboards


Retrieves scores from a specified leaderboard.


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

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

Parameter Reference

The params table contains parameters for the call.

leaderboardId (required)

String. Leaderboard ID from which to load scores.

position (optional)

String. One of the following values:

  • "top" — the top scores (default).
  • "single" — the current player's score.
  • "centered" — scores around the current player's score.
friendsOnly (optional)

Boolean. If true, loads only scores for the current player's friends.

limit (optional)

Number. Number of scores to load. The maximum and default is 25.

timeSpan (optional)

String. One of the following values:

  • "all time" — all scores (default).
  • "weekly" — scores from the week.
  • "daily" — scores from the day.
reload (optional)

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

listener (optional)

Listener. Listener function which receives a loadScores event.