Skip to content

Networking.SendTable

OliverF edited this page Jun 12, 2014 · 4 revisions

Sends the specified Lua table to all remote clients. On the RSAS client, the message is sent to the RSAS server. On the RSAS server, the message is sent to all connected RSAS clients.

Syntax

nil RSAS.Networking.SendTable(string id, table data)

Returns

  1. nil

Arguments

  1. string id
    Identification string for this message. Must be used by the remote client to receive the message.

  2. table data
    Data table to send to the remote client. The table can contain any data type, including other tables.

Example

local data = {}
data.animal = "cat"
data.tail = true
data.legs = 7

--create a sub-table
local catIdentity = {}
catIdentity.name = "Tom"
catIdentity.type = "tabby"

--add sub-table to data table
data.identity = catIdentity

RSAS.Networking.SendTable("demo_newanimal", data)

Clone this wiki locally