在eof'附近预计会出现错误。我无法找到解决方案

时间:2015-11-26 03:44:55

标签: lua multiplayer

此脚本出现此错误,任何人都可以找到错误吗?

function checkPing(thePlayer)
    ping = getPlayerPing(thePlayer)
    if ( ping > 500 ) then
    kickPlayer (thePlayer ,ToohighPing)
    outputChatBox (getPlayerName(thePlayer).."Has been kicked due to High ping",255,255,0)
end
addEventHandler ("OnResourceStart")

1 个答案:

答案 0 :(得分:3)

您需要有两个-L:一个用于关闭end语句,另一个用于关闭if。您可能在第5行和第6行之间缺少function