ReadUChar

This function reads an unsigned char value from a stream.

Syntax

Returns

Returns an unsigned char 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:WriteUChar(2)
stream:Seek(0)
System:Print(stream:ReadUChar())

return false -- -- set a breakpoint here and view the printed output