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

Logout & Cofka

Sherlok

Active Member
Joined
Aug 29, 2008
Messages
2,116
Reaction score
44
Location
Poland, Wrocław.
Hiho,
Mam silnik 0.3.6pl1 na linuxie, debian.

Obserwuję sobie putty, bo od włączenia otsa mam jakiś dziwny problem, że co jakiś czas serwer kicka graczy, a oni po zalogowaniu mają cofkę..

Problem pojawia się wtedy kiedy jest save..
Code:
> Saving server...
> SAVE: Complete in 2.094 seconds using relational house storage.

Po tym kicka graczy i ich cofa.

Ma ktoś jakiś pomysł na fix?
 
najlepiej to fix Knor
Pokaz global event save.lua moze masz tam jakiegos smiecia, jak nei to nie wiem.
 
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
 
Code:
local config = {
	broadcast = "no"
}

config.broadcast = getBooleanFromString(config.broadcast)
local function executeSave(seconds)
	if(seconds == 0) then
		doSaveServer()
		return true
	end

	if(seconds == 120 or seconds == 30) then
		doBroadcastMessage("Full server save within " .. seconds .. " seconds, please stay in safe place!")
	end

	seconds = seconds - 30
	if(seconds >= 0) then
		addEvent(executeSave, 30 * 1000, seconds)
	end
end

function onThink(interval, lastExecution, thinkInterval)
	if(not config.broadcast) then
		doSaveServer()
		doBroadcastMessage("Server saved")
		return true
	end

	executeSave(120)
	return true
end
Nie widze tu nic ale podmien...
 
Back
Top