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

Error: msg cant figure out

Started by nicon4454, 01 September 2012 - 03:20 PM
nicon4454 #1
Posted 01 September 2012 - 05:20 PM
i am getting an error that says on line 37 '=' expected

line 37 is sleep(0.5) does not use a = for it. i would be grateful for any help.

(sorry it removed the indent formatting)

thanks

Spoiler




function cl() -- clear land

while turtle.detectDown() do
while not turtle.detect() do
turtle.forward()
end
turtle.dig()
end
end

function tr()  --turn to the right
turtle.turnRight()
turtle.forward()
turtle.turnRight()
while not turtle.detect() do
turtle.forward()
end

end

function tl() -- tunr to the left
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
while not turtle.detect() do
turtle.forward()
end
end

while true do

cl()
sleep(0.5)
tr()
sleep(0.5)
cl
sleep(0.5)
tl()
sleep(0.5)
end

Lettuce #2
Posted 01 September 2012 - 07:44 PM
near the bottom, cl is missing a parenthesis. ComputerCraft thinks it's a variable, because you didn't label it a function with (). That's why it tells you to set the variable with '=.'