Properties

Method

new MMOItemVariable(name, value[, type])

Developers never istantiate the MMOItemVariable class: even if MMOItem Variables behave exactly like User Variables and support the same data types, they can be created, updated and deleted on the server side only.

An MMOItemVariable is a custom value attached to an MMOItem object that gets automatically synchronized between client and server on every change, provided that the MMOItem is inside the Area of Interest of the current user in a MMORoom.

Parameters

Name Type Optional Description

name

 

 

The name of the MMOItem Variable.

value

 

 

The value of the MMOItem Variable; it can also be null.

type

 

Yes

The type id of the MMOItem Variable among those available in the VariableType class. Usually it is not necessary to pass this parameter, as the type is auto-detected from the value.

Defaults to -1.

Extends
BaseVariable
See also
VariableType
MMOItem
MMORoom

Properties

read-only

isNull  unknown

Indicates if the Variable is null.

Inherited from
BaseVariable#isNull
read-only

name  unknown

Indicates the name of this variable.

Inherited from
BaseVariable#name
read-only

type  unknown

Indicates the type of this Variable. Possibly returned strings are: null, boolean, int, double, string, SFSObject, SFSArray.

Inherited from
BaseVariable#type
read-only

value  unknown

Returns the value of this variable.

Inherited from
BaseVariable#value

Method

toString() → string

Returns a string that contains the MMOItem Variable name, type and value.

Returns

string The string representation of the MMOItemVariable object.