Inherits from BaseVariable : NSObject
Conforms to IMMOItemVariable
Declared in MMOItemVariable.h
MMOItemVariable.m

Overview

The MMOItemVariable object represents a SmartFoxServer MMOItem Variable entity on the client.

It 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 (AoI) of the current user in the MMORoom.

Changes in the MMOItemVariables are dispatched via the [ISFSEvents onMMOItemVariablesUpdate] event

NOTE: MMOItem Variables behave exactly like User Variables and support the same data types, but they can be created, updated and deleted on the server side only.

Class Methods

variableWithName:value:

the name of the variable

+ (id)variableWithName:(NSString *)name value:(id)value

Parameters

name

the name of the variable

value

the variable value ( can be BOOL, Integer, Double, String, SFSObject, SFSArray )

Declared In

MMOItemVariable.h

variableWithName:value:type:

the name of the variable

+ (id)variableWithName:(NSString *)name value:(id)value type:(NSInteger)type

Parameters

name

the name of the variable

value

the variable value ( can be BOOL, Integer, Double, String, SFSObject, SFSArray )

type

(optional -1) it’s usually not necessary to pass this parameter as the variable value is auto-detected

Declared In

MMOItemVariable.h