Posted 10 December 2012 - 12:55 PM
Hello,
(i just noticed that i did not give this a title, Whoops)
I'm trying to write a basic code to build a house. I'm new to programming (I have a little experience with php).
this is what i have so far:
but when i run this the turtle only digs/places and moves forward once and gives this error message:
Build:4: attempt to compare string with number expected, got string
I can't figure out whats wrong.
To my understanding it should keep doing the commands until X is more than 9 (i)
Thanks in advance,
Zerozapper
(i just noticed that i did not give this a title, Whoops)
I'm trying to write a basic code to build a house. I'm new to programming (I have a little experience with php).
this is what i have so far:
x = "1"
i = "9"
while x<=i do
if turtle.detectDown() then
turtle.digDown()
else turtle.placeDown()
turtle.forward()
x = x + 1
end
end
but when i run this the turtle only digs/places and moves forward once and gives this error message:
Build:4: attempt to compare string with number expected, got string
I can't figure out whats wrong.
To my understanding it should keep doing the commands until X is more than 9 (i)
Thanks in advance,
Zerozapper