Posted 13 April 2013 - 07:06 AM
I created this script to learn arguments.
if you have it installed on a mining turtle, it will dig the block infront of it, if there is a block infront of it.
code:
common glitches
how to use:
if you have it installed on a mining turtle, it will dig the block infront of it, if there is a block infront of it.
code:
local tArgs= {...}
local x= tonumber(tArgs[1])
function digFront()--optional, works only on the mining turtle.
if turtle.detect() then
turtle.dig()
end
end
if x == nil then
digFront()--optional
turtle.forward()
else
for i= 1,tArgs[1] do
digFront()--again optional
turtle.forward()
print(x-i)
end
end
Note: i don`t use fuel on my turtles.common glitches
Spoiler
nothinghow to use:
- run the program, the argument