我在Computercraft上遇到了一个bios 367错误。

在我为计算机手工艺编写的程序中,该程序将用于控制塔的机场地图中,我收到了如下所示的消息:

bios:367:[string "AirportCommand"]:15: 语法错误

这是我的全部代码,请告诉我是否有任何错误:

local Landing_open = true
rednet.open("top")

while true do

  id, message, distance = rednet.receive()

  if message == "Requesting Landing" and Landing_open == true and distance<500 then
    rednet.send(id, "Landing is granted. Please respond with Landing finished when you exit the runway.")
    Landing_open = false

   elseif message == "Requesting Landing" and distance>=500 then
     rednet,send(id, "Landing is not granted. Please try again when you are closer to the airport,")

   elseif message == "Requesting Landing" and Landing_open == false then
    rednet.send(id, "Landing is not granted. Please try again later.")

   elseif message == "Landing Finished" then
    rednet.send(id, "Roger that")
    Landing_open = true
点赞
用户4273199
用户4273199

结构。

首先:如果这是你的完整代码,它是不能工作的!你没有关闭你的 if 结构和 while 结构。

试着添加两个 end 来扩展你的代码。一个用来关闭你的 if 结构,另一个用来关闭你的 while 结构。

2015-07-29 07:28:57