Lua:SaveGlobalData

From Fortress Forever Wiki
Jump to navigationJump to search


SaveGlobalData

Saves a Lua object as a serialized file allowing data to be transferred between map changes (the data can also be opened by any map).

Usage 1

SaveGlobalData( luaobject )

Input

  • luaobject(object) The table, string, boolean or number to be saved.

Output

Returns: nothing

Example

local datatable = { 1, 2, 3 }
SaveGlobalData( datatable )

Usage 2

SaveGlobalData( luaobject, suffix )

Input

  • luaobject(object) The table, string, boolean or number to be saved.
  • suffix(string) A suffix to add to distinguish different files.

Output

Returns: nothing

Example

local datatable = { 1, 2, 3 }
SaveGlobalData( datatable, "table" )