Posted 08 January 2013 - 08:18 AM
So I've been writing some code for a turtle where the turtle builds a little house and now I want it to go down the side of the building. However every time I get the 'end' expected to close the function. I tried moving about the ends, adding and removing them and normally it works but this is giving me some grief. Below is the code that I'm trying to use. Any help in pointing out my errors would be greatly appreciated. Thanks
function moveDown()
if turtle.detectDown() then
turtle.turnRight()
turtle.turnRight()
end
else
turtle.down()
moveDown()
end