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

Gps Issue.

Started by ksbd, 24 January 2013 - 06:18 AM
ksbd #1
Posted 24 January 2013 - 07:18 AM
First off - I'm terribly sorry if this has already been asked, I'd try searching but the search on this website wont allow "gps".

So, I've set up the GPS with neonerz's automatic build script in a superflat testing world.
I've used a wireless turtle to "gps locate" to test it's working, and I get it's position sent back correctly.
I then add code from the wiki to test (Down below) on the same turtle, and it runs properly.
I write my own code on a new wireless turtle, and it returns nil every time.
So I reboot minecraft just in-case, and get the same issue
So I try again, this time with the wiki code, and get the same issue, yet it can still run "gps locate". Just not anything that's not pre-programmed.
I check the first turtle I tried, and just like the last one, "gps locate" works, but the wiki code doesn't, despite it working before…

Wiki:


print("Man I am so lost right now!")
local x, y, z = gps.locate(5)
if x == nil then
   print("Nope, still lost :(/>")
else
   print("I am at ",x," ",y," ",z)
end

I'm using the Direwolf20 Modpack from the FTB launcher with Optifine installed.
Anyone know if I'm doing something wrong, if it's a bug, or if there's some incompatibility with mods or something?

edit: neonerz's program: http://www.computerc...-gps-deploy-10/
jewelshisen #2
Posted 24 January 2013 - 07:42 AM
You need to open the rednet modem first. Add this line at the top of the code:


rednet.open("right")
ksbd #3
Posted 24 January 2013 - 07:53 AM
It's always something simple like that. :/
Thanks.
jewelshisen #4
Posted 24 January 2013 - 07:54 AM
It's always something simple like that. :/
Thanks.

Hey no problem.