12 posts
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/nUL3KZteAfter 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
3790 posts
Location
Lincoln, Nebraska
Posted 28 September 2012 - 09:50 PM
It should be receiving the message…
How is your server set up?
12 posts
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")
436 posts
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").
3790 posts
Location
Lincoln, Nebraska
Posted 28 September 2012 - 09:58 PM
You should be typing rednet.broadcast("go"), not rednet.receive("go")
12 posts
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
3790 posts
Location
Lincoln, Nebraska
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.
436 posts
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.
12 posts
Posted 28 September 2012 - 10:05 PM
nope i always test right next to the console :P/>/>
This is angering
3790 posts
Location
Lincoln, Nebraska
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.
12 posts
Posted 28 September 2012 - 10:32 PM
tried both and neither work
3790 posts
Location
Lincoln, Nebraska
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?
12 posts
Posted 28 September 2012 - 11:49 PM
Yes
65 posts
Posted 28 September 2012 - 11:52 PM
Did you do rednet.open(<side>) ?
12 posts
Posted 28 September 2012 - 11:59 PM
yes