Справочник функций
GameMaker Studio · GML · Leaderboards & scores
gmda_getPlayerpos
Returns the player's cached global rank on a table (0 if unknown).
Synchronous (returns directly)
Signature
gmda_getPlayerpos(table) -> realWhat it does
Reads the locally cached global position for that table (filled on table load and after a successful submit). No network call.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| table | real | required | Table number to read. 1-based: the first declared table is 1, the second is 2, and so on. |
How to call it
Call any time after the tables_loaded event to show the player's rank instantly.
Returns: real: the cached global rank, or 0 if the table is invalid or the rank isn't known yet.
Example
show_debug_message("your rank: #" + string(gmda_getPlayerpos(1)));Use cases
- Display the player's worldwide rank next to their score.
- Show progress toward the top of the leaderboard.