Skip to main content
This annotation is intended for complex cases and is primarily designed to be used by the built-in annotations.

Overview

net_payload marks a function like net.WriteString or net.ReadUInt. GLuaLS compares the writes in a message’s sender with the reads in its receiver, and warns when they do not match in order or kind. The official annotations already mark the net library, and wrappers that call it are detected automatically.

Syntax

  • Direction is write or read.
  • Format names how the value is sent, such as string, uint or entity. A write matches a read with the same format.
The format is separate from the Lua type on purpose. net.ReadInt, net.ReadUInt and net.ReadFloat all return number, so only the format tells them apart. Mark a bit-count parameter, if there is one, with @call_arg gmod.net_payload bits.

Example


See also

  • @net_send: a function that sends the current net message