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

Gps at startup will not work for me. Help

Started by chrisflinn97, 31 March 2012 - 11:18 PM
chrisflinn97 #1
Posted 01 April 2012 - 01:18 AM
i have tried to make a Gps program to run at startup but it wont work it just says:
usage
gps host
gps host <x> <y> <z>
gps locate

The program i am using is:
x=0
y=0
z=0
shell.run("gps",x,y,z)

Help please
Luanub #2
Posted 01 April 2012 - 01:24 AM
you missed host in your shell.run


shell.run("gps", "host", x, y, z )
chrisflinn97 #3
Posted 01 April 2012 - 01:34 AM
Thank you so much!
Also how would i get it to startup on to a monitor?
Luanub #4
Posted 01 April 2012 - 04:57 AM
There are a couple of way. You can simply launch your program using the monitor program. So from the prompt do

monitor right hello

Or you can hardcode it into your program using something like..

monitor = peripheral.wrap("side")
term.redirect(monitor)
shell.run("gps", "host", x, y, z )
term.restore()

I have not tried it but it should work.