Skip to content

GameStorage

Functions

Function Name Usage Description Notes
GetCounter GameStorage.GetCounter(string counterName, callback callback) Get the value of a global counter for this game. Global counters are shared between all servers running the game and saved between sessions. The value is returned by calling the callback function with the value as an argument. Global counters are always whole (integer) numbers. Server Only
UpdateCounter GameStorage.UpdateCounter(string counterName, number increment, callback callback) Update the value of a global counter for this game by adding increment to the existing value. Global counters are shared between all servers running the game and saved between sessions. The new incremented value is returned by calling the callback function with the value as an argument. Global counters are always whole (integer) numbers. Server Only
UpdateCounter GameStorage.UpdateCounter(string counterName, number increment) Update the value of a global counter for this game by adding increment to the existing value. Global counters are shared between all servers running the game and saved between sessions. Global counters are always whole (integer) numbers. Server Only