Referência de funções
Godot 4 · GDScript · Leaderboards & scores
clear_pending
Drops the queued (not-yet-sent) score for a table.
Synchronous (returns directly)
Signature
clear_pending(table_index: int) -> voidWhat it does
Removes that table's entry from the pending-submission queue and persists the change. No network call. If it was the last pending entry, the retry timer stops.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| table_index | int | required | Table number whose pending submission should be removed (1-based: 1, 2, 3…). |
How to call it
Call to manually discard a queued submit_with_retry() score you no longer want sent (e.g. the player abandoned the run).
Returns: void
Example
if Gamdato.get_pending(1):
Gamdato.clear_pending(1)
print("queued score discarded")Use cases
- Cancel an unsent score after the player deletes their progress.
- Clear a stale queued entry when starting a fresh run.