Posted 02 January 2013 - 02:44 PM
Hi guys. A few days ago I discovered in tekkit there was computer craft and since I've programmed before in Java I figured why not in Minecraft, make my life a little easier. So I tried making something that would tunnel for me and x amount and also fill up lava space if there was any. I've spawned a source lava and put it in slot 1 and cobblestone in slot 2. When I input this into the mining turtle, save and attempt to run it. It gives me something along the lines of expected '=' near the lines of 25. I forget which line specifically or the entire error message. Thanks.
function detectSides()
for i=1,4 do
turtle.select(1)
if turtle.compare()==true then
turtle.select(2)
turtle.place()
end
turtle.turnLeft()
end
end
function detectUpDown()
turtle.select(1)
if turtle.compareUp()==true then
turtle.select(2)
turtle.placeUp()
end
turtle.select(1)
if turtle.compareDown()==true then
turtle.select(2)
turtle.placeDown()
end
end
write("how far should I dig and check for lava? Lava in slot 1 Cobble in slot 2.")
local Num = tostring(read())
for i=1,Num do
tunnel1
detectUpDown()
detectSides()
end