Modem.transmit

From ComputerCraft Wiki
Revision as of 13:57, 14 June 2015 by Bomb Bloke (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Grid Redstone.png  Function modem.transmit
Sends a message and a reply channel over the specified channel. The message may be any type of data excluding functions and threads, which will be received as nil. Prior to about CC 1.53, tables were also received as nil.
Syntax modem.transmit(number channel, number replyChannel, any message)
Returns nil
Part of ComputerCraft
API Modem

Examples

Grid paper.png  Example
Sends a string message and a reply channel over the specified channel.
Code
local modem = peripheral.wrap("top")

modem.transmit(1, 2, "Hello world!")




Grid paper.png  Example
Sends a table and reply channel over the specified channel.
Code
local modem = peripheral.wrap("top")

modem.transmit(1, 2, {"a", "b", "c"})