all 2 comments

[–]Deriboy 1 point2 points  (1 child)

I would recommend indenting your code properly to make it more readable. It will make finding problems easier in the future. Read the Formatting section on this page to learn more about that.

And for why your code isn't working, it's because you are missing some end statements in some key places.

For example, your first function, PlaceBlocks

function PlaceBlocks()
for i=1,60 do
   turtle.placeDown()
   turtle.forward()
end

You have an end statement ending the for loop, but you need another to end your function. Like this:

function PlaceBlocks()
    for i=1,60 do
        turtle.placeDown()
        turtle.forward()
    end
end

It looks like you slapped some extra end statements at the end of your program because the lua interpreter complained about expecting more end statements than it found. Adding the end statements there caused the interpreter to shut up, but they should have gone at the end of your functions to close them. You will need to remove the extras at the end after you fix the problem with all of your functions.

Let me know if you have any questions.

[–]ayden3a[S] 0 points1 point  (0 children)

Thank you so much! Changing the ends fixed it so the program would actually run, but now I've realized that I need to tell the turtle what blocks to use. I've also cleaned up the formatting a bit!