Posted 09 July 2014 - 09:00 PM
Hey.
The script gives me an error when the script is almost done.
Picture of the error: http://gyazo.com/8dd...0c7dd7526856a97
I tried to figure this out myself, and got stuck. The route for the turtle
http://gyazo.com/78a...cf8eb9d329207c3
It suppose to continue running until it gets at the bottom dirt on the picture, and go one block up just to make sure the script works.
The script gives me an error when the script is almost done.
Picture of the error: http://gyazo.com/8dd...0c7dd7526856a97
I tried to figure this out myself, and got stuck. The route for the turtle
http://gyazo.com/78a...cf8eb9d329207c3
It suppose to continue running until it gets at the bottom dirt on the picture, and go one block up just to make sure the script works.
local TIN = 10 -- Trees In Line
local BBT = 6 -- Blocks Between Trees
local BM = 0 -- Blocks Moved
local TT = 0 -- Trees Taken
local TR = 5 -- Tree Rounds ( 10 Lines = 5 Rounds )
local RT = 0 -- Rounds Taken
local ST = "Left" -- Side Turn
function ps() -- Place Sapling
TT = TT + 1
fw()
fw()
turtle.turnLeft()
turtle.turnLeft()
turtle.place()
turtle.turnRight()
turtle.turnRight()
check()
end
function check() -- Check status and sends movement
if TT < TIN then
next()
end
if TT == TIN and RT < TR then
switch()
elseif RT == TR then
park()
print("PARKED")
end
end
function switch() -- Switch lines and rotation side
for x = 1, 2 do
fw()
end
if ST == "Left" then
ST = "Right"
RT = RT + 1
turtle.turnLeft()
for x = 1, 7 do
fw()
end
turtle.turnLeft()
for x = 1, 2 do
fw()
end
elseif ST == "Right" then
ST = "Left"
turtle.turnRight()
for x = 1, 7 do
fw()
end
turtle.turnRight()
for x = 1, 2 do
fw()
end
end
BM = 0
TT = 0
ps()
end
function park()
turtle.up()
sleep(2)
end
function next() -- Move to next tree
BM = 1
while BM < BBT do
fw()
BM = BM + 1
end
ps()
end
function fw()
repeat
turtle.attack()
turtle.dig()
sleep(0)
until turtle.forward()
end
for x = 1, 1 do
ps()
end