SaveLoadData

File & Network View source
SaveLoadData

Asynchronously loads the data from the file of the given player and then synchronizes it with all other players. The listener will be invoked with the synced data string.

Source on GitHub

Re-exports: FileIO

Interfaces

LoadListener

public interface LoadListener

Members:

  • onLoad(LoadStatus status, ChunkedString data)

Enums

LoadStatus

public enum LoadStatus

Values: SUCCESS, FAIL_PLAYER_OFFLINE, FAIL_FILE_EMPTY, FAIL_CANT_READ

Extension Functions

LoadStatus.toString

public function LoadStatus.toString() returns string

LoadStatus.isFail

public function LoadStatus.isFail() returns boolean

player.saveData

public function player.saveData(string slotName, string data)

Blockingly saves the given data string for the given player.

player.saveData

public function player.saveData(string slotName, ChunkedString data)

Blockingly saves the given data string for the given player.

player.loadData

public function player.loadData(string slotName, LoadListener listener)

Constants

READ_FILES_IN_REPLAYS

public constant READ_FILES_IN_REPLAYS = false

🔧 Configurable. Override it in your map’s config package.