Lua 我在Computercraft上发现一个bios 367错误
在我的机场地图上的控制塔中使用的计算机程序中,我得到了如下信息: bios:367:[字符串“AirportCommand”]:15:语法错误 这是我的全部代码。如果您看到任何错误,请告诉我:Lua 我在Computercraft上发现一个bios 367错误,lua,minecraft,computercraft,Lua,Minecraft,Computercraft,在我的机场地图上的控制塔中使用的计算机程序中,我得到了如下信息: bios:367:[字符串“AirportCommand”]:15:语法错误 这是我的全部代码。如果您看到任何错误,请告诉我: local Landing_open = true rednet.open("top") while true do id, message, distance = rednet.receive() if message == "Requesting Landing" and Landing
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
locallanding\u open=true
rednet.open(“顶部”)
尽管如此
id,message,distance=rednet.receive()
如果消息==“请求着陆”且着陆打开==真且距离=500,则
rednet,发送(id,“不允许着陆。请在离机场较近时重试,”)
elseif message==“请求着陆”和着陆\u open==false然后
rednet.send(id,“不允许登录。请稍后重试”)
elseif message==“着陆完成”然后
rednet.send(id,“收到”)
着陆打开=真
首先:如果这是您的完整代码,它将无法工作!您不会关闭if
或while
结构
尝试将代码扩展两个
end
。其中一个关闭您的if
结构,另一个关闭您的,而此代码未编译且其中没有AirportCommand
,因此它不可能是此错误的来源。它不是“bios 367错误”。这是由第367行中的文件“bios”引发的初始错误。和“由第15行中的文件“AirportCommand”引起,而该行可能会产生误导。。。现在就写一个答案来解决你的问题你有rednet,发送
而不是rednet。发送
我知道你可以解决这个问题(参考:)为什么不告诉我们怎么做?请接受解决你问题的答案。或者自己写一封信,如果你一个人解决了,就接受它。