Difference between revisions of "Rednet message (event)"
From ComputerCraft Wiki
(Um, no, the distance is not calculated between the modems, but between the computers.) |
Bomb Bloke (Talk | contribs) (Protocols are a thing now.) |
||
Line 1: | Line 1: | ||
{{Event | {{Event | ||
|name=rednet_message | |name=rednet_message | ||
− | |desc=Fired when any | + | |desc=Fired when any [[rednet.send]]()'d message arrives through an open modem. |
|return1=The computer ID of the sender (see [[os.computerID|os.getComputerID()]]). | |return1=The computer ID of the sender (see [[os.computerID|os.getComputerID()]]). | ||
− | |return2=The message | + | |return2=The message. Functions / coroutines sent are converted to nil. Prior to about CC 1.53, so were tables, which required use of [[textutils.serialize]]() to transmit. |
− | |return3=The distance (in blocks) between the computers. | + | |return3=The [[Rednet_(API)#Protocols|protocol]] used, or nil if none was specified. Prior to CC 1.6, this was the distance (in blocks) between the computers. |
}} | }} | ||
{{Example | {{Example |
Latest revision as of 14:01, 14 June 2015
Event rednet_message | |
Fired when any rednet.send()'d message arrives through an open modem. | |
Returned Object 1 | The computer ID of the sender (see os.getComputerID()). |
Returned Object 2 | The message. Functions / coroutines sent are converted to nil. Prior to about CC 1.53, so were tables, which required use of textutils.serialize() to transmit. |
Returned Object 3 | The protocol used, or nil if none was specified. Prior to CC 1.6, this was the distance (in blocks) between the computers. |