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

3mR

Mapper
Joined
May 29, 2012
Messages
322
Reaction score
42
Hello Otland, :)
When i try to logout from account manger or any account i got this error
dxi1.jpg
 
Post your logout.lua, there are two functions "getLastFrags" and "setTmpDeaths" that dosen't exist.
 
Now when I can zoom(was on my phone) I see you got another script, creaturescripts/scripts/bot/login.lua.
 
Login.lua
function onLogin(cid)
resetIgnored(getPlayerGUID(cid))
setBot(cid, -1)
registerCreatureEvent(cid, "BotThink")
registerCreatureEvent(cid, "BotAttack")
registerCreatureEvent(cid, "BotKill")
registerCreatureEvent(cid, "BotStatsChange")
return true
end
logout.lua
function onLogout(cid)
war_saveTimeAliveRecord(cid)
setTmpDeaths(cid, 0)
setTmpAssists(cid, 0)
setTmpFrags(cid, 0)
setLastAssists(cid, 0)
setLastFrags(cid, 0)
resetTimeAlive(cid)
resetDamageCounter(cid)
db.executeQuery("UPDATE `players` SET `kills` = " .. getFrags(cid) .. ", `tmp_kills` = 0, `deaths` = " .. getDeaths(cid) .. ", `tmp_deaths` = 0, `assists` = " .. getAssists(cid) .. ", `tmp_assists` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
if(timeOnline[getPlayerGUID(cid)] ~= nil) then
local playerTimeOnline = os.time() - timeOnline[getPlayerGUID(cid)]
if(playerTimeOnline > 10) then
db.executeQuery("INSERT INTO `zotsme_logins` (`id`, `player_id`, `login_time`, `logout_time`, `online_time`, `kills`, `deaths`, `assists`) VALUES (NULL, " .. getPlayerGUID(cid) .. ", " .. timeOnline[getPlayerGUID(cid)] .. ", " .. os.time() .. ", " .. playerTimeOnline .. ", " .. getTmpFrags(cid) .. ", " .. getTmpDeaths(cid) .. ", " .. getTmpAssists(cid) .. ");")
end
end
return true
end
 
Try removing those scripts from login.lua, creaturescripts.xml and see if it works then, the problem is that I have no ide what server you are running and I have no clue what those scripts actually does.
Either contact the person who made them, remove them(might cause anything from small to big bugs ingame to no bugs at all.) or hire someone to fix them.

But I can see that no pro did that, since he uses extra scripts insted of using one like most scripters would today.
 
Back
Top