CloseFile

Definition

CloseFile(string filePath)

Description

Closes the file located in “Assets/Data/filePath”. If the file is not found, it returns an error message.

Parameters

filePath
File path in “Assets/Data/” folder.

Example

function Init()
    OpenFileForWriting("level1/data.bin")
    --write data to file here
    closefile("level1/data.bin")
end

function Update()

end
In this example, the function closefile Closes the “data.bin” file located in “Assets/Data/level1/” path.
adminCloseFile