This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
youeatpoo's profile picture

[error][lua] Trying to make turtle tunnel and fill lava holes.

Started by youeatpoo, 02 January 2013 - 01:44 PM
youeatpoo #1
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
Kingdaro #2
Posted 02 January 2013 - 02:49 PM
This line:

tunnel1

Try this instead:

shell.run('tunnel',1)
youeatpoo #3
Posted 02 January 2013 - 03:12 PM
Thanks so much Kingdaro!