This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
The_Gaming_Lab's profile picture

0 bugs

Started by The_Gaming_Lab, 20 February 2017 - 10:49 AM
The_Gaming_Lab #1
Posted 20 February 2017 - 11:49 AM
hey there! thanks for comming over here
(1.7.10 version Forge)
so i think its a bug there is a 0 before any text from rednet

here is my test code


rednet.open("(side)")
rednet.send(1,"test")

second computer


rednet.open("(side)")
print(rednet.recieve)

but on second i get this when i activate the program for the first computer to send "test"

0test

is this a bug, if there will be a fix to this thank you!
Lyqyd #2
Posted 20 February 2017 - 03:23 PM
Moved to Ask a Pro.

The first argument returned by rednet.receive is the ID number of the computer that the message is from. You're sending your message from computer #0.
houseofkraft #3
Posted 20 February 2017 - 05:19 PM
You can do this


rednet.open( "side" )
local sID, sMessage = rednet.receive()
print( sMessage )
kolya5544 #4
Posted 14 March 2017 - 03:17 PM
it is normal, rednet.receive() function receive an ID and Message, when you wrote print(rednet.receive) you got id and message in one line