2

我正在尝试使用计算机技术在我的世界中制作一个钥匙卡门,它在第 23 行给我一个错误,说是预期的

rs.setOutput("bottom", true)
while true do
  if disk.isPresent("top") then
    if fs.exists("disk/.cardauth/authkey") then
      f = fs.open("disk/.cardauth/authkey", "r")
      p = f.readAll()
      if p == "UDoFk6ErYM" then
        disk.eject("top")
        rs.setOutput("bottom", false)
        sleep(4)
        rs.setOutput("bottom", true)
      elseif p == "QmwZNWQsxFug6SMOYQnh" then
        disk.eject("top")
        break end
      else
        disk.eject("top")
      end
    else
      disk.eject("top")
    end
  end
  sleep(0.1)
end
4

1 回答 1

4

在第 14 行end之后有一个额外的内容。它过早地关闭了条件块。break您收到此错误消息是因为end文件底部的没有要关闭的内容。

于 2019-04-07T07:45:14.193 回答