Referencia de funciones
GameMaker Studio · GML · Leaderboards & scores
gmda_reloadinfo
Forces a reload of all leaderboard tables; finishes with the tables_loaded event.
Asynchronous (result via event)
Signature
gmda_reloadinfo() -> realWhat it does
Resets the table-loading state so the client re-fetches every declared table from the server, then queues a tables_loaded event when they're all back in. Returns 0 immediately if there is no active session; otherwise returns 1 and the reload runs in the background.
Parameters
This function takes no parameters.
How to call it
Call this to pull fresh rankings on demand (e.g. when the player opens the leaderboard screen or pulls to refresh), then watch for the "tables_loaded" event in gmda_pollEvent() and re-read gmda_getTabledata().
Result event: tables_loaded { success }
Example
gmda_reloadinfo();
// later, in a Step event:
var e = gmda_pollEvent();
while (!is_undefined(e)) {
if (e.event == "tables_loaded" && e.success) {
var grid = gmda_getTabledata(1);
// redraw the leaderboard from grid
}
e = gmda_pollEvent();
}Use cases
- Refresh all leaderboards when the player opens the ranking screen.
- Implement a manual pull-to-refresh for scores.