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

My first rednet

Started by arcticmunkii, 11 May 2013 - 04:10 AM
arcticmunkii #1
Posted 11 May 2013 - 06:10 AM
I'm really struggling to get rednet working to run my simple mining turtle program, my aim is to have multiple turtles run this when I input one command into my wireless computer.

http://pastebin.com/YJFDbNaf <——– this is my code, the name of the program is "hai" and my startup file is literally "shell.run("hai")"

However when I type "rednet.broadcast("hai") nothing seems to work? I am new to this sorry for the trouble.

Arctic
Lyqyd #2
Posted 11 May 2013 - 04:31 PM
Split into new topic.
Engineer #3
Posted 11 May 2013 - 05:26 PM
The parameters for rednet.receive() are:

local ID, message, distance = rednet.receive()
arcticmunkii #4
Posted 14 May 2013 - 06:40 AM
Thanks for your reply, I have been toying around with this for a while, I will try again when I get home today but it's getting pretty frustrating seeing ast rednet.send(id, "code") works yet rednet.broadcast("code") doesen't =S

Thanks

Arctic
arcticmunkii #5
Posted 14 May 2013 - 12:27 PM
Bump same problem

I'm using this

– Sender
rednet.broadcast("go")
– Receiver
id, message = rednet.receive()
if message == "go" then
shell.run("YourProgram")
end
LBPHacker #6
Posted 14 May 2013 - 01:00 PM
Modems open?
arcticmunkii #7
Posted 14 May 2013 - 05:08 PM
Of course :D/>, on startup they open, you can look at them on the server when you have time if you like, I've gone over it so many times I can't seem to find the problem, I've ended up creating a program which runs multiple rednet.send() commands :P/>

Thanks

Arctic
Engineer #8
Posted 18 May 2013 - 10:14 AM
Are you sure the modem opens on the correct side? Do you see a little red border on the modem after you opened it?