GameMaker Studio · GML · Leaderboards & scores
gmda_getTableConfig
Returns a table's dashboard config: sort order and whether period scores are enabled.
Signature
gmda_getTableConfig(table) -> structWhat it does
Reads the locally cached dashboard config for that table, captured from the leaderboard block the server includes in its leaderboard responses. No network call. The client itself uses this config: on historic-only tables (periods_enabled = false) it skips submits that cannot beat the cached best, since the server would store nothing.
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 adapt your UI to the table's settings (e.g. show 'lower is better' for asc tables, or hide period tabs when periods are disabled).
Returns: struct { sort_order, periods_enabled }: sort_order is "asc" or "desc", periods_enabled is a bool, the table's dashboard config captured from the server leaderboard responses. Defaults (desc / true) until the table has loaded at least once.
Example
var cfg = gmda_getTableConfig(1);
if (!cfg.periods_enabled) hide_period_tabs();
show_debug_message("sort: " + cfg.sort_order);Use cases
- Hide daily/weekly/monthly tabs on tables that only keep historic scores.
- Render an ascending (time-based) table with 'lower is better' labels.