Storage

Associated namespace: sm.storage

A userdata object representing a storage object.

Note:

A storage object is accessable via `self.storage` in scripted shapes (see ShapeClass).

The storage object also allows for data to be saved in creations saved on the Lift.

Functions:


load(storage)

Server only

Loads Lua data stored in the storage object.

If no data is stored in the object, this returns nil.

Parameters:

TypeNameDescription
StoragestorageThe storage.

Returns:

TypeDescription
anyThe data stored.

save(storage, data)

Server only

Saves any Lua data into the storage object.

The data will remain stored after closing the world, and is retrieved using load.

Parameters:

TypeNameDescription
StoragestorageThe storage.
anydataThe data to be stored.