net/WriteType

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 
{{Func
 
{{Func
|Description=Appends any type of value to the current net message.
+
|Description={{Internal|Used internally by {{LibraryFunction|net|WriteTable}}.}}
 +
 
 +
Appends any type of value to the current net message.
 +
 
 +
{{Note|An additional 8-bit unsigned integer indicating the type will automatically be written to the packet before the value, in order to facilitate reading with {{LibraryFunction|net|ReadType}}. If you know the data type you are writing, use a function meant for that specific data type to reduce amount of data sent.}}
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=No
 
|IsClass=No
|Name=WriteType
 
|Parent=net
 
 
|File=lua/includes/extensions/net.lua
 
|File=lua/includes/extensions/net.lua
 
|Line=144
 
|Line=144
Line 11: Line 13:
 
|type=any
 
|type=any
 
|name=Data
 
|name=Data
|desc=The data to be sent. A UInt(8) indicating the type will automatically be written to the packet before the value, in order to facilitate reading with {{LibraryFunction|net|ReadType}}.
+
|desc=The data to be sent
 
}}
 
}}

Latest revision as of 15:25, 29 September 2018

 net.WriteType( )

Description

This is an internal function or feature.
This means you will be able to use it, but you really shouldn't.

Used internally by net.WriteTable.

Appends any type of value to the current net message.

NOTE

An additional 8-bit unsigned integer indicating the type will automatically be written to the packet before the value, in order to facilitate reading with net.ReadType. If you know the data type you are writing, use a function meant for that specific data type to reduce amount of data sent.

Arguments

any Data

The data to be sent
Personal tools
Navigation