Functions Reference
GameMaker Studio · GML · Leaderboards & scores
gmda_getBestscore
Returns the player's cached best score on a table (0 if unknown).
Synchronous (returns directly)
Signature
gmda_getBestscore(table) -> realWhat it does
Reads the locally cached best score for that table (filled on table load and after a successful submit). No network call, so it works offline.
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 display the player's best instantly.
Returns: real: the cached best score, or 0 if the table is invalid or no score is known yet.
Example
show_debug_message("your best: " + string(gmda_getBestscore(1)));Use cases
- Show the player's personal best in the HUD or results screen.
- Compare against a new run to decide whether to celebrate a new record.