Stats - stingray.Stats namespace reference - Stingray Lua API Reference

stingray.Stats namespace reference

Description

The interface for accessing the player statistics functionality on Steam.

As the object is a singleton (there is only one Stats), you do not need to pass any Stats object to the functions. All the functions operate on the Stats singleton.

Functions

Parameters

name :

string

The name of the statistic whose value you want to retrieve.

Returns

number

The value of the named statistic.

Parameters

token :

integer

The token that provides access to the status of the operation.

Returns

steam_stat_progress

A steam_stat_progress table that indicates whether or not the operation is finished, and any errors encountered.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.
Parameters

name :

string

The name of the statistic to set.

value :

any(integer, number)

The value corresponding to the statistic.

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

integer

A token that tracks the progress of the operation.

Stats.set("score", 100, "strength" 2.5)