当我运行我的lua代码时,我得到了错误的'name'预期接近'end'|第12行
这是代码:
local i = 1
local plr = game.Players.LocalPlayer
function start()
repeat
wait()
game.ReplicatedStorage.addpoints:FireServer()
until i == 2
end
function end()
i = 2
end
plr.Chatted:connect(function(message)
if message == "start" then
start()
elseif message == "end" then
end()
end
end)
任何修复程序?
function end()
i = 2
end
在这里,end
是一个关键字,您不能将其用作函数名称。 stop
?