Posted 10 October 2012 - 06:51 PM
Just created this program and it will not run.
When I try to run it it says…
Bios : 206 : [string "drillDown"] : 48 : ' do ' expected
If you see the problem, please let me know how to fix. Thanks!
code…
When I try to run it it says…
Bios : 206 : [string "drillDown"] : 48 : ' do ' expected
If you see the problem, please let me know how to fix. Thanks!
code…
--[[ Program name : drillDown
This program moves 1 forward then drills down to
bedrock, looking for ores on all sides, then
fills any holes it leaves, including the
hole it made going down--]]
--[[ Use a MINING TURTLE for this program and
make sure the following slots
have correct items
slots 1-12 clear
slot 13 has 64 coal/charcoal
slot 14 has 64 cobblestone
slot 15 has 01 stone
slot 16 has 64 dirt
--]]
--[[ set numeric var's --]]
fuellvl = 0
amtchar = 0
downMoves = 0
mineProceed = 1
X = 0
T = 0
flagDud = 0
--[[ refuel section --]]
fuellvl = turtle.getFuelLevel()
if fuellvl<100 then
amtchar = turtle.getItemCount(13)
if amtchar > 1 then
turtle.select(13)
turtle.refuel(2)
turtle.select(1)
else
if amtchar > 0 then
turtle.select(13)
turtle.refuel(1)
turtle.select(1)
end
end
end
--[[ move forward one --]]
turtle.forward()
--[[ moving and mining --]]
while mineProceed = 1 do
if turtle.detectDown() == true then
turtle.digDown()
end
if turtle.down() == true then
turtle.down()
downMoves = downMoves + 1
else
mineProceed = 0
end
for T = 1,4 do
if turtle.detect() == true then
flagDud = 0
for X = 14,16 do
turtle.select(X)
if turtle.compare() == true then
flagDud = 1
end
end
if flagDud == 0 then
turtle.dig()
if turtle.getItemCount(14) > 1 then
turtle.select(14)
else
turtle.select(16)
end
turtle.place()
end
end
turtle.turnRight()
end
end
--[[ finished mining, move up and fill --]]
while downMoves > 0 do
turtle.up()
if turtle.getItemCount(14) > 1 then
turtle.select(14)
else
turtle.select(16)
end
turtle.place()
downMoves = downMoves - 1
end