save_system_progress table reference - Stingray Lua API Reference

save_system_progress table reference

Description

Returned by calls to stingray.SaveSystem.progress() on Windows, Mac OS X, iOS and Android platforms in order to give details on the status of an asynchronous file save or load operation, and to provide access to the data loaded.

Data Members

data : any

For load operations, this value contains the data originally saved to the file.

done : boolean

Indicates whether or not the save or load operation has finished.

Note that this text is an error code that is not suitable for user display. Typical values include:

  • STINGRAY_SAVEDATA_ERROR_MISSING: The specified file does not exist.
  • STINGRAY_SAVEDATA_INVALID_FILENAME: The specified filename is invalid.
  • STINGRAY_SAVEDATA_IO_ERROR: A disk error occurred.
  • STINGRAY_SAVEDATA_BROKEN: The saved data is corrupted.
  • STINGRAY_UNSUPPORTED_VERSION: The data was saved using an old version, and cannot be loaded by this version.

progress : number

A number between 0 and 1 that indicates the percentage of the current operation that has been completed.