WriteInt

This function writes an integer value to a stream.

Syntax

Parameters

Example

local path = "MyFile.dat" 

local stream = FileSystem:WriteFile(path)
if (stream==nil) then Debug:Error("Failed to write file.") end

stream:WriteInt(2)

stream:Release()

stream = FileSystem:ReadFile(path)
if (stream==nil)then Debug:Error("Failed to read file.") end

System:Print(stream:ReadInt())