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

Globalsave- house not found

Eraghon

New Member
Joined
Mar 2, 2009
Messages
94
Reaction score
0
Location
Szczecin
Hello, I have problem with 5 houses

I have errors in console during globalsve
housek.png


someone said that I have to add filtrs to this script:
Code:
local requiredTime = 60 * 60 * 24 * 20
function onThink(interval, lastExecution)
doSaveServer()
	local result_plr = db.getResult("SELECT * FROM `houses`;")
	if(result_plr:getID() ~= -1) then
	while(true) do

		local owner = tonumber(result_plr:getDataInt("owner"))
		local hid = tonumber(result_plr:getDataInt("id"))
		local lastlogin = 0
		local result = db.getResult("SELECT * FROM `players` WHERE `id` = ".. owner ..";")
		if(result:getID() ~= -1) then
			while(true) do

			lastlogin = tonumber(result:getDataInt("lastlogin"))

			if not(result:next()) then
				break
			end

		end

		result:free()
		end
		
		if lastlogin < os.time(t) - requiredTime then
			setHouseOwner(hid, 0, true)
		end

	if not(result_plr:next()) then
	break
	end

	end

	result_plr:free()
	end
return TRUE
end

but what should I add and where?
 
Back
Top