Skip to main content

CloudVariables.GetScoreBoard(string variableName, boolean descending = true, number skip = 0, number limit = INF)

Get score board associated with a variable name. The score board is generated based on previously assigned variables to users. A user with an assigned variable matching the name provided included in the score board if the variable type is number. You can specify where and how much of scoreboard to retrieve by assigning skip and limit parameters.

Parameters:

NameTypeDescription
variableNamestringName of the variable to retrieve the scoreboard.
descendingbooleanGet the scoreboard with higher values first.
skipnumberNumber of scores to skip at the beginning before returning the scoreboard.
limitnumberLimit how many scores to be returned.

Returns:

typeDescription
PromiseA promise which resolves to an array of ScoreBoardEntry

Usage

---@type string
local variableName;

---@type boolean
local descending;

---@type number
local skip;

---@type number
local limit;


local val0 = CloudVariables:GetScoreBoard(variableName, descending, skip, limit)