小编Jea*_*Luc的帖子

如果陈述不适用于Lua

这是我的代码.我正在玩tekkit并希望控制水流量.棕色电线上有红石电源但不是黑色电源,但它仍然适用于ERROR!任何人都知道我的问题是什么?

在Lua代码中:

shell.run("clear")
brown = rs.testBundledInput("back", colors.brown)
black = rs.testBundledInput("back", colors.black)
t = true
f = nil

if brown == t and black == f then
  redstone.setBundledOutput("back", restone.getBundledOutput("back") -colors.brown)
  print("All water is flowing.")
  sleep(3)
  shell.run("2")
elseif brown == f and black == t then
  redstone.setBundledOutput("back", restone.getBundledOutput("back") -colors.black)
  print("All water is flowing.")
  sleep(3)
  shell.run("2")
elseif brown == t and black == t then
  redstone.setBundledOutput("back", restone.getBundledOutput("back") -colors.brown)
  redstone.setBundledOutput("back", restone.getBundledOutput("back") -colors.black)
  print("All water is flowing.")
  sleep(3)
  shell.run("2")
elseif brown == f …
Run Code Online (Sandbox Code Playgroud)

lua

1
推荐指数
1
解决办法
275
查看次数

标签 统计

lua ×1