Skip to main content

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:

NameTypeDescription
variableNamestringThe name of the variable to create summary from.
subjectVariableSubjectThe subject in which the summary is collected from.

Returns:

typeDescription
PromiseA promise which resolves to a CloudVariableSummary object.

Usage

---@type string
local variableName;

---@type VariableSubject
local subject;


local val0 = CloudVariables:GetUserVariableSummary(variableName, subject)