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

Mining turtle program wont respond to rednet

Started by Wolf9988, 28 September 2012 - 07:40 PM
Wolf9988 #1
Posted 28 September 2012 - 09:40 PM
Hey i just came back to a project i started working on along time ago. But when i did a test run and broadcast a message through a computer the turtle dint respond like it would've. Here is the code: http://pastebin.com/nUL3KZte

After the Awaiting connection to server and receives the message go it should runScript() but nothing happens when it receives the message i'm not sure if its just not receiving it or what..

Any help is Appreciated


P.S. sorry if it doesnt look organized it messes with it when i paste it and i tryed to fix it best i can
Cranium #2
Posted 28 September 2012 - 09:50 PM
It should be receiving the message…
How is your server set up?
Wolf9988 #3
Posted 28 September 2012 - 09:55 PM
oh for sending the messages because im still working on the console i just go on a computer with rednet, go to the lua console and then type: rednet.broadcast("go")
OmegaVest #4
Posted 28 September 2012 - 09:56 PM
And, to make matters short: Have you used any debug prints to figure out if it actually receives the message? And further, executes the if statement? Simple, yes, but sometimes it's the simple stupid things that make all the difference.


EDIT: I hope you mean rednet.send("go") or rednet.broadcast("go"). Because those are the only ones that send outward. And you definitely need a target ID for send, ie rednet.send(1, "go").
Cranium #5
Posted 28 September 2012 - 09:58 PM
You should be typing rednet.broadcast("go"), not rednet.receive("go")
Wolf9988 #6
Posted 28 September 2012 - 10:00 PM
ok first yes that was a typo
i did broadcast

and secondly i did do a test print i set it so that if it received the message it would print something but no response from it after broadcasting go
Cranium #7
Posted 28 September 2012 - 10:03 PM
You may be out of range of the modem. Do a test with a computer directly next to your turtle.
OmegaVest #8
Posted 28 September 2012 - 10:04 PM
Okay. . . how far ar the modems apart? And in a sphere, not a cube.

After that, I have nothing.


EDIT: DAMMIT CRANIUM! You is fast.
Wolf9988 #9
Posted 28 September 2012 - 10:05 PM
nope i always test right next to the console :P/>/>

This is angering
Cranium #10
Posted 28 September 2012 - 10:16 PM
EDIT: DAMMIT CRANIUM! You is fast.
Not fast, just have CC forums open at work, with nothing to do until my next incoming call. Not ninja, just bored.

As far as your problems, are you doing rednet.broadcast(go) or rednet.broadcast("go")? There is a difference. One sends a variable "go"(which is probably nil), and the other sends the string "go", which is what we want.
Wolf9988 #11
Posted 28 September 2012 - 10:32 PM
tried both and neither work
Cranium #12
Posted 28 September 2012 - 10:45 PM
I am at a complete loss…..
The only thing I can think of, is that the sending console doesn't have rednet opened. Is the modem lit up?
Wolf9988 #13
Posted 28 September 2012 - 11:49 PM
Yes
dimitriye98 #14
Posted 28 September 2012 - 11:52 PM
Did you do rednet.open(<side>) ?
Wolf9988 #15
Posted 28 September 2012 - 11:59 PM
yes