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

Rednet permanent receive

Started by deefster1000, 17 January 2013 - 04:04 AM
deefster1000 #1
Posted 17 January 2013 - 05:04 AM
I just need a program that will start checking for rednet signals, and then when it receives it, it prints it to the screen, and then go's back to checking for more signals.
i would also like it to work on a monitor, considering the bug that means the monitor doesn't support the arguments after the program for some reason, by that i mean you can type things like "monitor left hello" but it would just output "usage: edit <path>" on the monitor if i type in "monitor left edit [generic_text_file_name]"
zekesonxx #2
Posted 17 January 2013 - 05:20 AM
This is pretty simple, I'll just code it for you

while true do --Infinite Loop
  id, msg = rednet.receive() -- Receiving messages
  print("ID: "..id.." MSG: "..msg) --Printing ID and Message on the screen
end  --Going back to line one, as it's a infinite loop.
deefster1000 #3
Posted 17 January 2013 - 05:25 AM
thank you

Edit: i probably should i mentioned that i dont know how to run/install or create the programs for usage

Edit 2: sorry, just done that
KaoS #4
Posted 17 January 2013 - 07:36 AM
don't forget to open your modem at the top!
deefster1000 #5
Posted 17 January 2013 - 09:05 AM
i remembered that, the only problem was one of my friends computers didn't have enough space for a modem and a disk drive(i was copying the file over), so i kept forgetting to take the disk drive out, and there was no modem to open, therefore as the program doesnt end, and didnt seem to be terminated by ctrl+t, so i had to destroy it and restart the entire process.