Hello Otland,
I have an issue here with my serversave for TFS 1.0.
I am going to assume the function OnThink has not been compiled with my version of TFS 1.0 but I was hoping someone could confirm what this error message might mean:
I have an issue here with my serversave for TFS 1.0.
I am going to assume the function OnThink has not been compiled with my version of TFS 1.0 but I was hoping someone could confirm what this error message might mean:
Code:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false
local function serverSave()
if shutdownAtServerSave then
Game.setGameState(GAME_STATE_SHUTDOWN)
else
Game.setGameState(GAME_STATE_NORMAL)
end
if cleanMapAtServerSave then
cleanMap()
end
saveServer()
end
local function secondServerSaveWarning()
Game.broadcastMessage('Server is saving game in one minute. Please go to a safe place.', MESSAGE_STATUS_WARNING)
addEvent(serverSave, 60000)
end
local function firstServerSaveWarning()
Game.broadcastMessage('Server is saving game in 3 minutes. Please go to a safe place.', MESSAGE_STATUS_WARNING)
addEvent(secondServerSaveWarning, 120000)
end
function onTime(interval)
Game.broadcastMessage('Server is saving game in 5 minutes. Please go to a safe place.', MESSAGE_STATUS_WARNING)
Game.setGameState(GAME_STATE_STARTUP)
addEvent(firstServerSaveWarning, 120000)
return not shutdownAtServerSave
end