sm.storage.save

Saves any Lua object with a given key. The key can be any lua object.

Kind: Function

Environments: Game

Game

sm.storage.save( key, data )

Open the full Game reference

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

Note: The data is stored globally within the current mod. As of such, keys will not collide with external mods and scripts.

Parameters:

Name Type Description
key any The key that will be used to get the data.
data any The data to be stored.