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

[lua][Rednet][Error] Receiver computer issues

Started by jetbooster, 20 November 2012 - 01:12 PM
jetbooster #1
Posted 20 November 2012 - 02:12 PM
Hi, i have a general GPS system around my complex, with a startup program containing:
sleep(10) – in an attempt to fix the problem i'm having
rednet.broadcast()
followed by a shell.run() with the gps host x y z in it.

however when i set another computer up to receive these messages (also initiated by a startup)
the messages never arrive. however, if i run the gps system manually (by typing startup into the gps consoles, so the same program) then all the messages arrive fine. The receiver program could not be simpler, and there is no delay on it's startup.

rednet.open("right")
while true do
  sleep(0.5)
  id, msg = rednet.receive()
  print(msg)
end


As a side note, i intend to use the reciever computer purely as a slave to a monitor, but for some reason monitor doesn't accept a print during a while true loop. there is no sleep in the rednet recieve i guess, so could that be preventing it? ressetting too quickly? thanks :(/>/>
Lyqyd #2
Posted 20 November 2012 - 02:13 PM
Sleep eats events. Why do you even have a sleep in there?
jetbooster #3
Posted 20 November 2012 - 02:15 PM
i'll try without, thanks :(/>/>


Edit:nope still nothing printing on the reciever.
jetbooster #4
Posted 20 November 2012 - 02:40 PM
FFFUUUU realised the problem *facepalm* the only part of the statup program for the hosts that performed rednet.open() was the gps command, at the END… the rednet.broadcast could never leave. thanks anyway, pretty sure i can fix it now