WriteUShort

This function writes an unsigned short 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:WriteUShort(2)
stream:Seek(0)
System:Print(stream:ReadUShort())