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.

Server-only

load

storage:load(  )

Loads Lua data stored in the storage object.

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

Parameters:

Name Type Description
storage Storage The storage.

Returns:

Type Description
any The data stored.

save

storage:save( data )

Saves any Lua data into the storage object.

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

Parameters:

Name Type Description
storage Storage The storage.
data any The data to be stored.