问题
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