• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Server Shutsdown while saving

Heroman

New Member
Joined
Oct 1, 2012
Messages
84
Reaction score
0
so my server said global save after 5 mins please logout

then while saving it shutsdown any idea how to fix that?
 
data/globalevents/scripts/serversave.lua (1.x):
Code:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false

local function serverSave()
   if shutdownAtServerSave then
       Game.setGameState(GAME_STATE_SHUTDOWN)
   else
       Game.setGameState(GAME_STATE_CLOSED)

       if cleanMapAtServerSave then
           cleanMap()
       end

       Game.setGameState(GAME_STATE_NORMAL)
   end
end

local function secondServerSaveWarning()
   broadcastMessage("Server is saving game in one minute. Please logout.", MESSAGE_STATUS_WARNING)
   addEvent(serverSave, 60000)
end

local function firstServerSaveWarning()
   broadcastMessage("Server is saving game in 3 minutes. Please logout.", MESSAGE_STATUS_WARNING)
   addEvent(secondServerSaveWarning, 120000)
end

function onTime(interval)
   broadcastMessage("Server is saving game in 5 minutes. Please logout.", MESSAGE_STATUS_WARNING)
   Game.setGameState(GAME_STATE_STARTUP)
   addEvent(firstServerSaveWarning, 120000)
   return not shutdownAtServerSave
end
 
If you're using tfs 0.x find this line in config.lua & set it to false
shutdownAtGlobalSave
 
Back
Top