Posted 23 May 2014 - 10:09 PM
Just learned the basics of LUA and decided to try my new knowledge out in ComputerCraft.
Up until this point I've mostly just used pastebins, but started adding my own code.
So I've set up a gps gobal positioning system using this guide. Everything works fine, I've no trouble getting my location with gps locate or
Of course I wanted to take it a step further and see if I could use rednet.broadcast to send my turtles location to a receiving computer. Tested rednet.broadcast, works fine. made this simple little code:
But all I get is an empty message. I've tried simplifying it, so it just defines the gps variable and then sends it, but it makes no difference. It just simply won't broadcast the turtle location to my receiving computer.
The server I'm using is only on OS 1.5, but I can't imagine that would be the problem. can anyone please help me!
Up until this point I've mostly just used pastebins, but started adding my own code.
So I've set up a gps gobal positioning system using this guide. Everything works fine, I've no trouble getting my location with gps locate or
local x, y, z =gps.locate()
print(" ",x," ",y," ",z)
Of course I wanted to take it a step further and see if I could use rednet.broadcast to send my turtles location to a receiving computer. Tested rednet.broadcast, works fine. made this simple little code:
local x, y, z =gps.locate()
if x== nill then
print("fail whale")
else
rednet.broadcast(" ",x," ",y," ",z)
end
But all I get is an empty message. I've tried simplifying it, so it just defines the gps variable and then sends it, but it makes no difference. It just simply won't broadcast the turtle location to my receiving computer.
The server I'm using is only on OS 1.5, but I can't imagine that would be the problem. can anyone please help me!