【发布时间】:2021-05-25 02:35:22
【问题描述】:
好的,所以我正在制作一个 gui,它会自动检测你在玩什么游戏。唯一的问题是,如果你在游戏中它不支持它应该踢你并留言
if game.GameId == "301549746" then
btxt.Text = "Game detected, Counter-Blox"
end
if game.GameId == "137877687" then
btxt.Text = "Game detected, Rociticens"
end
if game.GameId == "286090429" then
btxt.Text = "Game detected, Aresenal"
end
if else
game.Players.LocalPlayer:Kick("game not supported");
end
由于某种原因,我不能在这种情况下使用 else 它只是用红色下划线“else”然后不会运行
【问题讨论】:
-
我看不懂这句话“我不能在这段代码中做其他事情,因为它有错误”,你是说代码有运行时错误??
-
我的意思是我不能在那种情况下使用 else 我不知道为什么,它只是用红色强调“else”然后根本不会运行