Data persistence

= Data Persistence = Data Persistence is a method for saving data from one game session to another. The data is saved on the player, and to the place, which means that you can't use the data between games and that the player that got saved data must be in a server for the server to be able to load the data.

A way to save data between game is to use badges, but it is really complicated and one-way based.

Data Persistence is functions in the Player object.

:LoadBoolean(String key) :LoadNumber(String key) :LoadString(String key) :LoadInstance(String key) :SaveBoolean(String key,Bool value) :SaveNumber(String key,Number value) :SaveString(String key,String value) :SaveInstance(String key,Object value)

:WaitForDataReady
Used to make sure all data is ready, use this before any other Data Persistence code!

:Load[Type](String key)
:LoadNumber(String key) :LoadString(String key) :LoadInstance(String key) Load data of the given type from the given key in the player.

:Save[Type](String key,[Type] value)
:SaveNumber(String key,Number value) :SaveString(String key,String value) :SaveInstance(String key,Object value) Saves data of the given type to the given key in the player.

Restrictions
As said the saved data is tied to a game and a player. It might be a 45000 byte storage limit (it is suggested in the official wiki)