• 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 save problem

GOD Wille

Excellent OT User
Joined
Jan 11, 2010
Messages
2,826
Solutions
2
Reaction score
815
Location
Sweden
Sometimes when server saves it fucks up with Server is under maintenance etc..
and it never stops saving then!! just continue... how to fix so it only saves one time and not continue and saves 10times

Thank you!

Rep++
omgzor.jpg
 
Lua:
local config = {
	broadcast = {120, 30},
	shallow = "no",
	delay = 120,
	events = 30
}

config.shallow = getBooleanFromString(config.shallow)

local function executeSave(seconds)
	if(isInArray(config.broadcast, seconds)) then
		local text = ""
		if(not config.shallow) then
			text = "Full s"
		else
			text = "S"
		end

		text = text .. "erver save within " .. seconds .. " seconds, please mind it may freeze!"
		doBroadcastMessage(text)
	end

	if(seconds > 0) then
		addEvent(executeSave, config.events * 1000, seconds - config.events)
	else
		doSaveServer(config.shallow)
	end
end

function onThink(interval, lastExecution, thinkInterval)
	if(table.maxn(config.broadcast) == 0) then
		doSaveServer(config.shallow)
	else
		executeSave(config.delay)
	end

	return true
end
 
you use TFS v0.4
correct??

put in globalevents
(Only v0.4)
Lua:
	<globalevent name="save" interval="9000" event="script" value="save.lua"/>
 
No i use tfs 0.3.6, and i solved this problem, it was something wrong with the forever aol script in creaturescripts. since i removed that it haven't crashed..
 
Back
Top