nut.data.set - brianhang/nutscript2 GitHub Wiki
Description
nut.data.set(key, value, ignoreMap, global)
This shared function sets a variable that is persistently stored, so it can be accessed even after the server/client stops running.
Parameters
| Name | Description |
|---|---|
key |
An identifier for the value. |
value |
The value to store. This can be anything besides functions and some userdata types. |
ignoreMap |
A boolean for whether or not the data is stored only for the current map. |
global |
A boolean for whether or not the data value is only for the current gamemode. |
Side Effects
- The data stored on disk is modified.
- The DataSet hook is called.
Example
nut.data.set("foo", "bar")