• 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!

TFS 1.3 serversaves is taking more than 1hour

monkeyy

Member
Joined
Aug 20, 2011
Messages
153
Reaction score
9
Hello all!

As the title conveys, the automated serversave on my server has been saving for an hour now.

1622882725593.png
Since then I cant login to the server anymore. I dont want to restart it manually and I'd prefer that the server saves a little bit faster :p

Players online: 0
1622882822305.png
1622882850858.png

It probably has nothing to do with my specs/internet speed. But im trying to provide you with enough info :p

Hope someone can help me out here!

Thanks in advance.
 
OP
OP
monkeyy

monkeyy

Member
Joined
Aug 20, 2011
Messages
153
Reaction score
9
Hello Evil! Thanks for your reply :D

This is the serversave.lua that Im currently using:

Lua:
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


And I have a second file called autosave.lua:
Code:
local cleanMapAtSave = true

local function serverSave()
    if cleanMapAtSave then
        --cleanMap()
    Game.broadcastMessage('Server Saved, next save in 2 hours.', MESSAGE_STATUS_WARNING)
    end

    saveServer()
end

function onThink(interval)
    Game.broadcastMessage('Server Save within 30 seconds, may cause a little freeze, do not worry.', MESSAGE_STATUS_WARNING)
    addEvent(serverSave, 60000)
    return true
end
 
Top