0

有一个我无法摆脱的错误。当我运行脚本时,每次都会出现以下错误:

bios:14: [string "Digger"]:35: '<eof>' expected

write("X:")
x = read()
write("Y:")
y = read()
write("Z:")
z = read()
for zi=0, z, 1 do
    for xi=0, x, 1 do
        for yi=0, y, 1 do
            turtle.dig()
            turtle.forward()
        end
        if xi < x then
            if xi % 2 then
                turtle.turnLeft()
                turtle.dig()
                turtle.forward()
                turtle.turnLeft()
            else
                turtle.turnRight()
                turtle.dig()
                turtle.forward()
                turtle.turnRight()
            end
        end
    end
    if y % 2 == 1 then
        turtle.turnRight()
        for back=0, y, 1 do
            turtle.forward()
        end
        turtle.turnRight()
    end 
end

虽然我已经在网上查到了很多东西一定有尽头,但是我没有发现错误。你能告诉我有什么问题吗?

4

0 回答 0