Difference between revisions of "ObjVar"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
(Created page with "== Object Variables == Object Variables are saved when a backup is performed. This means that after a full restart of the server, the GameObj will return to the state it was i...")
 
Line 9: Line 9:
  
 
You can save [[Number | Numbers]], [[String | Strings]], [[Bool | Bools]], and [[Table | Tables]] in an ObjVar and can specify any String name of your choice.
 
You can save [[Number | Numbers]], [[String | Strings]], [[Bool | Bools]], and [[Table | Tables]] in an ObjVar and can specify any String name of your choice.
 +
[[Category:Architecture]]

Revision as of 22:32, 29 October 2016

Object Variables

Object Variables are saved when a backup is performed. This means that after a full restart of the server, the GameObj will return to the state it was in during the backup.

gameObj:SetObjVar("Name", "Larry")
name = gameObj:GetObjVar("Name")
gameObj:SetObjVar("SomeObjVarNameIChose", 53.2)
aUserNum = gameObj:GetObjVar("SomeObjVarNameIChose")

You can save Numbers, Strings, Bools, and Tables in an ObjVar and can specify any String name of your choice.