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

do String expected, but its there

Started by Rhinehart_, 25 October 2012 - 08:50 PM
Rhinehart_ #1
Posted 25 October 2012 - 10:50 PM
alright here is a function from my stripminer program

for i = 1, z do
while not turtle.forward() do
turtle.dig()
end
end

but when i run the program i get an error saying 'do' expected on line 2 but as you can see its there, im also getting the same error with if functions except its saying it needs a 'then'

so pretty much the program reader isnt seeing the dos and thens i suppose

oh im still using 1.4.3 btw
tom2018 #2
Posted 25 October 2012 - 11:44 PM
make it
while turtle.forward() ~= true do
Cloudy #3
Posted 26 October 2012 - 01:24 AM
alright here is a function from my stripminer program

for i = 1, z do
while not turtle.forward() do
turtle.dig()
end
end

but when i run the program i get an error saying 'do' expected on line 2 but as you can see its there, im also getting the same error with if functions except its saying it needs a 'then'

so pretty much the program reader isnt seeing the dos and thens i suppose

oh im still using 1.4.3 btw

This is weird. It is most likely some problem in your code though.