Skip to content

Api > CloudVariables > GetUserVariableSummary()


CloudVariables.GetUserVariableSummary(string variableName, VariableSubject subject)⚓︎

Returns the summary about a variable that assigned to the specified subject. The summary is generated by going through all the variables instances assigned to the subject and collecting summary information. An example of summary usage is to get the total number of golds being distributed to users in server, given that the multiple worlds in the server can give gold to player for various reasons.

Parameters:⚓︎

Name Type Description
variableName string The name of the variable to create summary from.
subject VariableSubject The subject in which the summary is collected from.

Returns:⚓︎

type Description
Promise A promise which resolves to a CloudVariableSummary object.

Usage⚓︎

---@type string
local variableName;

---@type VariableSubject
local subject;


local val0 = CloudVariables:GetUserVariableSummary(variableName, subject)