Jump to content




My first rednet


  • You cannot reply to this topic
7 replies to this topic

#1 arcticmunkii

  • Members
  • 4 posts

Posted 11 May 2013 - 05: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

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 11 May 2013 - 03:31 PM

Split into new topic.

#3 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 11 May 2013 - 04:26 PM

The parameters for rednet.receive() are:
local ID, message, distance = rednet.receive()


#4 arcticmunkii

  • Members
  • 4 posts

Posted 14 May 2013 - 05: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

#5 arcticmunkii

  • Members
  • 4 posts

Posted 14 May 2013 - 11:27 AM

Bump same problem

I'm using this

-- Sender
rednet.broadcast("go")
-- Receiver
id, message = rednet.receive()
if message == "go" then
shell.run("YourProgram")
end

#6 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 14 May 2013 - 12:00 PM

Modems open?

#7 arcticmunkii

  • Members
  • 4 posts

Posted 14 May 2013 - 04: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

#8 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 18 May 2013 - 09: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?





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users