ReadInt

This function reads an integer value from a stream.

Syntax

Returns

Returns an integer value read from the stream.

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())