Posted 21 August 2013 - 02:42 PM
How do I get a turtle to take input and move that many times? Like if the user types in '7' and it moves 7 blocks?
local tArgs = {...}
if #tArgs ~= 1 then
print("Usage:")
print("programName <blocks to move>")
else
for i = 1, tAgs[1] do
turtle.forward()
end
print("Moved "..tArgs[1].." blocks")
end
Nah, that'd be one too many moves.-snip-
for i = 1, tArgs[1] do -- doesn't start from 0
Oh yeah haha (fixed)Nah, that'd be one too many moves.-snip-for i = 1, tArgs[1] do -- doesn't start from 0