-
Notifications
You must be signed in to change notification settings - Fork 1
Stream Functions
DizzasTeR edited this page Apr 19, 2021
·
4 revisions
- None
Stream:new()
-
readByte() — Read data as bytes
-
readNumber() — Read data as integers/numbers
-
readFloat() — Read data as decimal/number
-
readString() — Read data as text
-
writeByte(uint8_t data) — Write bytes into data stream
-
writeNumber(int data) — Write integer/number into data stream
-
writeFloat(float data) — Write a decimal into data stream
-
writeString(string data) — Write text into data stream
-
send(Player player / nil) — Send the stream to the player or all players if player is nil
-
clear() — Clear all the data stream
- None
- None
local stream = Stream:new()
stream:writeString("Hello!")
stream:writeNumber(10)
stream:writeFloat(3.14)
stream:send()