Back to TPG

TPG.Stats.Save

S🏷️ Stats

Part of TPG namespace

TPG.Stats.Save()
View on GitHub|gamemode/systems/sv_stats.lua:185-241
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Write the leaderboard to disk, if anything has changed since the last write. Cheap to call: it returns immediately unless something marked the store dirty, which is why the autosave timer, the shutdown hook and the disconnect hook can all point straight at it. On failure it prints a warning and leaves the store dirty, so the next autosave tries again rather than assuming the work is safe. Nothing here deletes a good file before its replacement is in hand.

Parameters

No parameters.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.