Write full error, saying "error on line 318" is not useful. Edited: Ok you edited it, here is:
function RaceMode:onPlayerWasted(player)
if not self.checkpointBackups[player] then
return
end
TimerManager.destroyTimersFor("checkpointBackup",player)
if RaceMode.getMapOption('respawn') == 'timelimit' and not RaceMode.isPlayerFinished(source) then
-- See if its worth doing a respawn
local respawnTime = RaceMode.getMapOption('respawntime') or 10000
if (type(respawnTime) ~= "number") then respawnTime = 10000 end
if self:getTimeRemaining() - respawnTime > 3000 then -------line 317 error
Countdown.create(respawnTime/1000, restorePlayer, 'You will respawn in:', 255, 255, 255, 0.25, 2.5, true, self.id, player):start(player)
end
if RaceMode.getMapOption('respawntime') >= 5000 then
TimerManager.createTimerFor("map",player):setTimer(clientCall, 2000, 1, player, 'Spectate.start', 'auto')
end
end
if g_MapOptions.respawn == 'none' then
removeActivePlayer( player )
if getActivePlayerCount() < 1 and g_CurrentRaceMode.running then
RaceMode.endMap()
end
end
end