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

Solved Error on save?

Status
Not open for further replies.

Naaano201

Member
Joined
Jun 5, 2011
Messages
241
Reaction score
8
Location
Barcelona
Is there any problem with that script?

save.lua
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)
	if(table.maxn(config.broadcast) == 0) then
		doSaveServer(config.shallow)
	else
		executeSave(config.delay)
	end

	return true
end

XML:
<globalevent name="save" interval="900000" event="script" value="save.lua"/>

When server crash the players lose some items and go back to other position.

Always with that script the save time is 0 seconds.

And now I tried command /save and it spend 0.917 seconds.

Maybe something is wrong and that's why always says 0 seconds?
 
Tried with using yes instead?

Code:
shallow = "no"
 
Last edited:
Shallow = no

Code:
SAVE: Complete in 0 seconds using binary-tilebased house storage.


Shallow = yes

Code:
SAVE: Complete in 0.904 seconds using binary-tilebased house storage.

I suppose that now works, right?
 
hi guys, i have a problem, \/

[15/12/2012 16:45:21] sqlite3_prepare_v2(): SQLITE ERROR: near "''": syntax error (UPDATE "players" SET "lastlogin" = 1355586316, "lastip" = 1391145482, "level" = 300, "group_id" = 4, "health" = 2000, "healthmax" = 3000, "experience" = 441084800, "lookbody" = 68, "lookfeet" = 76, "lookhead" = 78, "looklegs" = 39, "looktype" = 75, "lookaddons" = 0, "lookmount" = 0, "maglevel" = 150, "mana" = 5000, "manamax" = 55000, "manaspent" = 0, "soul" = 100, "town_id" = 2, "posx" = 154, "posy" = 49, "posz" = 7, "cap" = 900, "sex" = 0, "balance" = 0, "stamina" = 151200000, "skull" = 0, "skulltime" = 0, "promotion" = 0, "conditions" = x'', "loss_experience" = 100, "loss_mana" = 100, "loss_skills" = 100, "loss_containers" = 100, "loss_items" = 100, "lastlogout" = 0, "blessings" = 0, "pvp_blessing" = 0, "offlinetraining_time" = 43200, "offlinetraining_skill" = -1, "marriage" = 0, "guildnick" = '', "rank_id" = 0, "vocation" = 1 WHERE "id" = 7;)
[15/12/2012 16:45:24] sqlite3_prepare_v2(): SQLITE ERROR: near "''": syntax error (UPDATE "players" SET "lastlogin" = 1355586316, "lastip" = 1391145482, "level" = 300, "group_id" = 4, "health" = 2000, "healthmax" = 3000, "experience" = 441084800, "lookbody" = 68, "lookfeet" = 76, "lookhead" = 78, "looklegs" = 39, "looktype" = 75, "lookaddons" = 0, "lookmount" = 0, "maglevel" = 150, "mana" = 5000, "manamax" = 55000, "manaspent" = 0, "soul" = 100, "town_id" = 2, "posx" = 154, "posy" = 46, "posz" = 7, "cap" = 900, "sex" = 0, "balance" = 0, "stamina" = 151200000, "skull" = 0, "skulltime" = 0, "promotion" = 0, "conditions" = x'', "loss_experience" = 100, "loss_mana" = 100, "loss_skills" = 100, "loss_containers" = 100, "loss_items" = 100, "lastlogout" = 1355586323, "blessings" = 0, "pvp_blessing" = 0, "offlinetraining_time" = 43200, "offlinetraining_skill" = -1, "marriage" = 0, "guildnick" = '', "rank_id" = 0, "vocation" = 1 WHERE "id" = 7;)
[15/12/2012 16:45:24] sqlite3_prepare_v2(): SQLITE ERROR: near "''": syntax error (UPDATE "players" SET "lastlogin" = 1355586316, "lastip" = 1391145482, "level" = 300, "group_id" = 4, "health" = 2000, "healthmax" = 3000, "experience" = 441084800, "lookbody" = 68, "lookfeet" = 76, "lookhead" = 78, "looklegs" = 39, "looktype" = 75, "lookaddons" = 0, "lookmount" = 0, "maglevel" = 150, "mana" = 5000, "manamax" = 55000, "manaspent" = 0, "soul" = 100, "town_id" = 2, "posx" = 154, "posy" = 46, "posz" = 7, "cap" = 900, "sex" = 0, "balance" = 0, "stamina" = 151200000, "skull" = 0, "skulltime" = 0, "promotion" = 0, "conditions" = x'', "loss_experience" = 100, "loss_mana" = 100, "loss_skills" = 100, "loss_containers" = 100, "loss_items" = 100, "lastlogout" = 1355586323, "blessings" = 0, "pvp_blessing" = 0, "offlinetraining_time" = 43200, "offlinetraining_skill" = -1, "marriage" = 0, "guildnick" = '', "rank_id" = 0, "vocation" = 1 WHERE "id" = 7;)
[15/12/2012 16:45:24] sqlite3_prepare_v2(): SQLITE ERROR: near "''": syntax error (UPDATE "players" SET "lastlogin" = 1355586316, "lastip" = 1391145482, "level" = 300, "group_id" = 4, "health" = 2000, "healthmax" = 3000, "experience" = 441084800, "lookbody" = 68, "lookfeet" = 76, "lookhead" = 78, "looklegs" = 39, "looktype" = 75, "lookaddons" = 0, "lookmount" = 0, "maglevel" = 150, "mana" = 5000, "manamax" = 55000, "manaspent" = 0, "soul" = 100, "town_id" = 2, "posx" = 154, "posy" = 46, "posz" = 7, "cap" = 900, "sex" = 0, "balance" = 0, "stamina" = 151200000, "skull" = 0, "skulltime" = 0, "promotion" = 0, "conditions" = x'', "loss_experience" = 100, "loss_mana" = 100, "loss_skills" = 100, "loss_containers" = 100, "loss_items" = 100, "lastlogout" = 1355586323, "blessings" = 0, "pvp_blessing" = 0, "offlinetraining_time" = 43200, "offlinetraining_skill" = -1, "marriage" = 0, "guildnick" = '', "rank_id" = 0, "vocation" = 1 WHERE "id" = 7;)
[15/12/2012 16:45:24] Error while saving player:(name of my char).


in my server . when i open server and move or put anyitems in my bp and relog, the char get back as first time i logged, i don't know why don't save :S , anyhelp plz and thanks
 
Status
Not open for further replies.
Back
Top