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

[Solved] [Error] bios:206: [string "9X9"]:10: '=' expected

Started by oway13, 23 September 2012 - 02:36 AM
oway13 #1
Posted 23 September 2012 - 04:36 AM
I get this error when I add the below code to my program: bios:206: [string "9X9"]:10: '=' expected
I have look through it and I cannot find a place where I need a '='.
I could use help please.



local a = 1
function middlelayer()
  for i = 1, 9 do
	turtle.placeDown()
	turtle.forward()
  end
  turtle.turnRight()
  turtle.forward
  repeat
	for i = 1, 8 do
	  turtle.placeDown()
	  turtle.forward()
	end
	turtle.turnRight()
	turtle.forward()
	a = a + 1
   until a == 3
   for i = 1, 7 do
	turtle.placeDown()
	turtle.forward()
   end
  turtle.up
  turtle.forward
end
chiloxsan #2
Posted 23 September 2012 - 05:17 AM
It seems that you have forgotten parentheses (round brackets)  at
  • turtle.forward on line 8
  • turtle.up on line 22
  • turtle.forward on line 23
oway13 #3
Posted 23 September 2012 - 02:48 PM
It seems that you have forgotten parentheses (round brackets)  at
  • turtle.forward on line 8
  • turtle.up on line 22
  • turtle.forward on line 23

I have fixed it, thank you, but now I get:
bios:206: [string "9X9"]:83: '=' expected


Here is the entire code:


local a = 1
function middlelayer()
for i = 1, 9 do
	turtle.placeDown()
	turtle.forward()
  end
  turtle.turnRight()
  turtle.forward()
  repeat
	for i = 1, 8 do
	  turtle.placeDown()
	  turtle.forward()
	end
	turtle.turnRight()
	turtle.forward()
	a = a + 1
   until a == 3
   for i = 1, 7 do
	turtle.placeDown()
	turtle.forward()
   end
  turtle.up()
  turtle.forward()
end

turtle.select(16)
for w = 1, 3 do
  for i = 1, 8 do
	turtle.digDown()
	turtle.placeDown()
	turtle.forward()
  end
  turtle.turnRight()
  turtle.digDown()
  turtle.placeDown()
  turtle.forward()
  turtle.turnRight()
	for q = 1, 8 do
	 turtle.digDown()
	 turtle.placeDown()
	 turtle.forward()
   end
  turtle.turnLeft()
  turtle.digDown()
  turtle.placeDown()
  turtle.forward()
  turtle.turnLeft()
  end
turtle.select(15)
  for i = 1, 8 do
	turtle.digDown()
	turtle.placeDown()
	turtle.forward()
  end
  turtle.turnRight()
  turtle.digDown()
  turtle.placeDown()
  turtle.forward()
  turtle.turnRight()
  for i = 1, 8 do
  turtle.digDown()
  turtle.placeDown()
  turtle.forward()
  end
  turtle.turnLeft()
  turtle.digDown()
  turtle.placeDown()
  turtle.forward()
  turtle.turnLeft()
  for i = 1, 9 do
  turtle.digDown()
  turtle.placeDown()
  turtle.forward()
  end
	turtle.back()
  
turtle.select(14)
turtle.up
middlelayer() --Line 83
turtle.select(13)
middlelayer()
turtle.select(11)
middlelayer()
turtle.select(10)
middlelayer()
turtle.select(9)

sjele #4
Posted 23 September 2012 - 02:52 PM
You forgot () on line 82.

turtle.up --Thats how you had it

turtle.up() --Change it to this
oway13 #5
Posted 23 September 2012 - 02:58 PM
You forgot () on line 82.

turtle.up --Thats how you had it

turtle.up() --Change it to this

It works now, thanks! It seems I am bad at remembering parentheses, and then spotting them after.
sjele #6
Posted 23 September 2012 - 02:59 PM
When you have = expected error. Check the line before it. and check that that line dosent miss a ()