Difference between revisions of "Modem.transmit"
From ComputerCraft Wiki
Apemanzilla (Talk | contribs) |
Bomb Bloke (Talk | contribs) m |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|name=''modem''.transmit | |name=''modem''.transmit | ||
− | |args={{type|number}} channel, {{type|number}} replyChannel, message | + | |args={{type|number}} channel, {{type|number}} replyChannel, {{type|any}} message |
|returns={{type|nil}} | |returns={{type|nil}} | ||
|api=Modem | |api=Modem | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Sends a message and a reply channel over the specified channel. The message may be any type of data excluding {{type|function}}s and {{type|thread}}s, which will be received as {{type|nil}}. | + | |desc=Sends a message and a reply channel over the specified channel. The message may be any type of data excluding {{type|function}}s and {{type|thread}}s, which will be received as {{type|nil}}. Prior to about CC 1.53, {{type|table}}s were also received as nil. |
|examples= | |examples= | ||
{{Example | {{Example |
Latest revision as of 13:57, 14 June 2015
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
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!") |
Example | |
Sends a table and reply channel over the specified channel. | |
Code |
local modem = peripheral.wrap("top") modem.transmit(1, 2, {"a", "b", "c"}) |