Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 894 Bytes

NO_FILE_VERSION.markdown

File metadata and controls

30 lines (21 loc) · 894 Bytes

save.NO_FILE_VERSION

 
Type Number
Library save.*
Keywords data, save
See also Sample code, save.getVersion(), save.load()

Overview

This property is the return value for the [save.getVersion()](getVersion.markdown] function, when there is no save file.

Example

local save = require 'plugin.save'

save.init( "bad-filename.json", 1, {36, 45, 92, 36, 19, 28, 5}, "bveiubv984nw0" )

if (save.getVersion() == save.NO_FILE_VERSION) then
	print("No save file!")
else
	print("Save file version: " .. save.getVersion())
	save.load()
	print(save.data)
end