Posted 31 August 2012 - 05:11 PM
Hi guys,
I'm trying to code a little sorting turtle but it doesn't work.
Here is my code:
It gives me the error: bios:206: [string "Sort"]:58: '=' expected
But at line 58 I already have a = (for w=1,4,1 do)
Whats wrong with the code?
Also do you know a more compact way to do this?
Thanks in advance
I'm trying to code a little sorting turtle but it doesn't work.
Here is my code:
Spoiler
function Compare()
turtle.select(16)
turtle.suck()
for i=1,15,1 do
turtle.select(i)
if turtle.compareTo(16) == true then
turtle.drop()
end
end
turtle.select(16)
turtle.drop()
end
function Next()
turtle.turnLeft()
for w=1,1,3 do
turtle.forward()
end
turtle.turnRight()
end
turtle.select(1)
for s=1,15,1 do
turtle.suck()
end
turtle.turnRight()
trutle.turnRight()
for w=1,4,1 do
turtle.forward()
end
Compare()
Next()
Compare()
Next()
Compare()
turtle.turnRight()
for w=1,6,1 do
turtle.forward()
end
turtle.turnRight
for w=1,4,1 do <--(line 58)
turtle.forward()
end
It gives me the error: bios:206: [string "Sort"]:58: '=' expected
But at line 58 I already have a = (for w=1,4,1 do)
Whats wrong with the code?
Also do you know a more compact way to do this?
Thanks in advance