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

targs?

Started by jakemg, 15 June 2013 - 05:27 PM
jakemg #1
Posted 15 June 2013 - 07:27 PM
Hi I forgot how to do targs for my turtle
what im trying to is have the program start with
"welcome to quarry"
"please say how far you want me to mine"
"width":(then have the turtle read what was input and set that to x)

you dont have to put print("welcome to quarry blah blah blah you can just say how to put targs and how to read them

thanks =D
ElvishJerricco #2
Posted 15 June 2013 - 07:30 PM

tArgs = { ... }

local x = tonumber(tArgs[1] or "")
while not x do
	print("Need a distance to travel in number form")
	x = tonumber(read())
end

-- rest of code goes below