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

My monitor isn't functioning.

Started by AFakeman, 08 May 2013 - 11:44 PM
AFakeman #1
Posted 09 May 2013 - 01:44 AM
Title: My monitor isn't functioning.
I have a program:

rednet.open("right")
monitor=peripheral.wrap(left)
monitor.setTextScale(1)
while true do
message = rednet.receive()
monitor.write(message)
end
But when I try broadcasting ay message, my monitor just writes 3,0. What to do?
LBPHacker #2
Posted 09 May 2013 - 12:37 PM
rednet.receive returns both the ID of the computer that sent the message, the message itself, and even the distance between the two computers. You can easily get the message using a dummy variable:
local _, message = rednet.receive()