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

[error][lua] code expected =

Started by kcid, 02 September 2012 - 12:17 AM
kcid #1
Posted 02 September 2012 - 02:17 AM
error: bios 206: [string "pumpkin"]:113: '=' expected

trying to make a pumpkin farm (using tekkit)
What is a fix?

code:

local x = 0
local y = 0

turtle.up()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.turnRight()

repeat
turtle.digDown()
turtle.forward()
x = x + 1

until x == 22

turtle.turnLeft()

repeat
turtle.digDown()
turtle.forward()
y = y+1
until y == 28

turtle.turnLeft()
turtle.turnLeft()

repeat
turtle.digDown()
turtle.forward()
y = y - 1
until y == 0

local x = 0

repeat
turtle.turnRight()
turtle.digDown()
turtle.forward()
turtle.forward()
turtle.digDown()
turtle.forward()
turtle.turnRight()
repeat
turtle.forward()
turtle.digDown()
y = y + 1
until y == 28
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.digDown()
repeat
turtle.forward()
turtle.digDown()
y = y - 1
until y == 0
x = x + 1
until x == 7

turtle.turnRight()
turtle.digDown()
turtle.forward()
turtle.forward()
turtle.digDown()
turtle.forward()
turtle.turnRight()

repeat
turtle.digDown()
turtle.forward()
y = y+1
until y == 28

turtle.turnLeft()
turtle.turnLeft()

repeat
turtle.digDown()
turtle.forward()
y = y - 1
until y == 0

turtle.Turnleft()

local x = 0

repeat
turtle.forward()
x = x + 1
until x == 22

turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.turnRight()
turtle.turnRight()

turtle.drop(64)
turtle.drop(64)
turtle.drop(64)
turtle.drop(64)
turtle.drop(64)
turtle.drop(64)
turtle.drop(64)
turtle.drop(64)
turtle.drop(64)

sleep (10)

turtle.down
Lettuce #2
Posted 02 September 2012 - 02:29 AM
turtle.TurnLeft() is supposed to be turtle.turnLeft() lua is very finnicky about case, it thinks that's a variable, and is asking you to set it.
Lettuce #3
Posted 02 September 2012 - 02:31 AM
Okay… Last post got "erased" somehow, but my name's still there.

turtle.Turnleft() is supposed to be turtle.turnLeft() Lua is very finicky about case, it thinks you're trying to call a variable, and is asking you to set it with '='

That's near the bottom, above local x = 0.

ALSO: please use code tags, and on lengthy pieces of code, spoiler tags too. That will look like this:

[*spoiler]
[*code]
–code goes here
[*/code]
[*/spoiler]

Remove the asterisks.