I got a bios 367 error on Computercraft

谁说我不能喝 提交于 2020-01-17 14:36:27

问题


On my program for Computer craft that will be used in a control tower in my airport map, I got a message that looked like this:

bios:367:[string "AirportCommand"]:15: syntax error

Here is all my code please tell me if you see any errors:

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

回答1:


First of all: If this is your full code it can't work! you don't close your if nor your while structure.

Try to extend your code by two end. One closes your if structure and one you while



来源:https://stackoverflow.com/questions/31691023/i-got-a-bios-367-error-on-computercraft

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!