我知道这个问题已被问到,但我找不到任何有用的东西,继承我的代码:
print("Welcome to Text RPG \n");
function commmand()
print("What do you want to do? \(\"help\" for help\) \n NOTE: MUST BE IN CAPS")
input = io.read()
--condition = input == "HELP" or input == "EAST" or input == "WEST" or input =="NORTH" or input == "SOUTH" or input == "SHOP"
if input == "HELP" or input == "EAST" or input == "WEST" or input =="NORTH" or input== "SOUTH" or input == "SHOP" then
--Future game code
end
end
command()
我尝试过搜索,但我找到了答案,我甚至只是想问这个问题
答案 0 :(得分:1)
print("Welcome to Text RPG \n");
function command()
print("What do you want to do? \(\"help\" for help\) \n NOTE: MUST BE IN CAPS")
input = io.read()
--condition = input == "HELP" or input == "EAST" or input == "WEST" or input =="NORTH" or input == "SOUTH" or input == "SHOP"
if input == "HELP" or input == "EAST" or input == "WEST" or input =="NORTH" or input== "SOUTH" or input == "SHOP" then
--Future game code
end
end
command()
您需要更改:
function commmand()
到
function command()
请注意已删除的m
。