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

'=' Expected Error? But There Is An Equals!

Started by artman41, 18 November 2013 - 11:53 AM
artman41 #1
Posted 18 November 2013 - 12:53 PM
My minecraft keeps telling me that I'm missing a '=' on line 32, which I do happen to have an equals on. :/ I'm just really confused xD the code is designed to place blocks for to to make my roof :D/> heres the code for it:

i = 0
h = 0

function dDown()
turtle.detectDown()
end

function l()
turtle.turnLeft()
end

function r()
turtle.turnRight()
end

function f()
turtle.forward()
end

function b()
turtle.back()
end

function place()
turtle.placeDown()
end

function check()
dDown()
if dDown() == false then
place()
end
f()
end

function checkLong()
while i < 13 do
check
i = i+1
end
end

function Check2()
while i == 13 do
l()
f()
l()
i = 0
checkLong()
r()
f()
r()
end
end

while h < 20 do
checkLong()
check2()
h = h+2
end
Lyqyd #2
Posted 18 November 2013 - 02:15 PM
Look at the previous line. You just have `check`. It thinks you're going to give it a new value, so when it gets to the next line and sees i instead, it throws that error. Put the parentheses you've missed on the previous line. And next time you encounter an error, read the sticky topics. This exact situation is explained in detail in the Common Errors section of the post you should have read before asking a question.