#Lua SEXPs

$Operator: lua-save-data-integer
$Category: Change
$Subcategory: Scripted
$Minimum Arguments: 2
$Maximum Arguments: 3
$Return Type: Nothing
$Description: Saves data into a file for a variety of nefarious purposes. File will be saved as [PLAYERNAME]-[suffix].sav. Suffix defaults to "sdx". This version is for storing integers only. Data stored as a JSON formatted file.
$Parameter:
	+Description: Key to store data under
	+Type: String
$Parameter:
	+Description: Value to store under the key
	+Type: Number
$Parameter:
	+Description: Suffix for data saving
	+Type: String
	
$Operator: lua-save-data-string
$Category: Change
$Subcategory: Scripted
$Minimum Arguments: 2
$Maximum Arguments: 3
$Return Type: Nothing
$Description: Saves data into a file for a variety of nefarious purposes. File will be saved as [PLAYERNAME]-[suffix].sav. Suffix defaults to "sdx". This version is for storing strings only. Data stored as a JSON formatted file.
$Parameter:
	+Description: Key to store data under
	+Type: String
$Parameter:
	+Description: Value to store under the key
	+Type: String
$Parameter:
	+Description: Suffix for data saving
	+Type: String
	
$Operator: lua-get-data-integer
$Category: Status
$Subcategory: Mission
$Minimum Arguments: 1
$Maximum Arguments: 2
$Return Type: Number
$Description: Returns an integer stored under a certain key. It will look at a file named [PLAYERNAME]-[suffix].sav. Suffix defaults to "sdx". This version is for resolving integers only. If it doesn't exist, will return 0.
$Parameter:
	+Description: Key that data was stored under
	+Type: String
$Parameter:
	+Description: Suffix for data loading
	+Type: String
	
$Operator: lua-get-data-string
$Category: Status
$Subcategory: Mission
$Minimum Arguments: 2
$Maximum Arguments: 3
$Return Type: Nothing
$Description: Takes a string found under a certain key and puts it into a sexp variable. It will look at a file named [PLAYERNAME]-[suffix].sav. Suffix defaults to "sdx". This version is for strings only. Since FreeSpace SEXPs can't return strings, we can only tell it to put stuff in a variable... If it doesn't exist will return empty string.
$Parameter:
	+Description: Key that data was stored under
	+Type: String
$Parameter:
	+Description: Variable to store result in
	+Type: Variable
$Parameter:
	+Description: Suffix for data loading
	+Type: String	
	
$Operator: lua-clear-saved-data
$Category: Change
$Subcategory: Scripted
$Minimum Arguments: 0
$Maximum Arguments: 1
$Return Type: Nothing
$Description: Deletes saved data saved under [PLAYERNAME]-[suffix].sav.
$Parameter:
	+Description: File suffix to delete
	+Type: String


#End