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

[Lua][Error]bios:206: [string "sizedtunnel"]:29: '=' expected

Started by Henness, 31 March 2012 - 05:02 AM
Henness #1
Posted 31 March 2012 - 07:02 AM
I need help with my program I just started it but I can't seem to get it to work.
Can anyone help?

ERROR:

bios:206: [string "sizedtunnel"]:29: '=' expected


CODE:
local tArgs = { ... }
if #tArgs ~= 1 then
print( "Usage: sizedtunnel <width>" )
return
end
local width = tonumber( tArgs[1] )
if width < 1 then
print( "Tunnel Width must be positive" )
return
end
local move = 0
 
print("Tunnelling...")
loop = 1
while loop == 1 do
move = width
--Start
if turtle.detect() then
  turtle.dig()
  turtle.forward()
else
  turtle.forward()
end
turtle.turnLeft

--Side Movement
while move > 0 do
  if turtle.detectDown() then
   turtle.digDown()
  end
  if turtle.detect() then
   turtle.dig()
   turtle.forward()
   move = move - 1
  else
   turtle.forward()
   move = move - 1
  end
end
end
http://pastebin.com/Rez64azr
ComputerCraftFan11 #2
Posted 31 March 2012 - 07:22 AM
Try
I need help with my program I just started it but I can't seem to get it to work.
Can anyone help?

ERROR:

bios:206: [string "sizedtunnel"]:29: '=' expected


CODE:
local tArgs = { ... }
if #tArgs ~= 1 then
print( "Usage: sizedtunnel <width>" )
return
end
local width = tonumber( tArgs[1] )
if width < 1 then
print( "Tunnel Width must be positive" )
return
end
local move = 0

print("Tunnelling...")
loop = 1
while loop == 1 do
move = width
--Start
if turtle.detect() then
  turtle.dig()
  turtle.forward()
else
  turtle.forward()
end
turtle.turnLeft()

--Side Movement
while move > 0 do
  if turtle.detectDown() == true then
   turtle.digDown()
  end
  if turtle.detect() == true then
   turtle.dig()
   turtle.forward()
   move = move - 1
  else
   turtle.forward()
   move = move - 1
  end
end
end
http://pastebin.com/Rez64azr
Luanub #3
Posted 31 March 2012 - 07:25 AM
You missed the brackets on your turnLeft

change

turtle.turnLeft
to
turtle.turnLeft()

Henness #4
Posted 31 March 2012 - 07:34 AM
Thanks guys, I feel dumb now can't belive I didn't see that