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

Save server.

slaw

Software Developer
Joined
Aug 27, 2007
Messages
3,666
Solutions
125
Reaction score
1,113
Location
Germany
GitHub
slawkens
I have added 1 line to:
Code:
void Game::saveData(bool savePlayers)
Becouse i want to know when all was saved.

This line i added:
Code:
std::cout << "> > > > > > >Players saved. < < < < < < <" << std::endl;

And after using normal command !save "xx it shows ok, but when i'm closing server this message is showed 2x times:

uo0038vf0.jpg


So server is saved 2 times before shutdown, for what is it? Meybe thats why some players lost items after shutdown or what :(

Btw. Server save is working ok on my local computer, but on dedicated dont. I have sheduler task that at 6:05 is starting server again, so at 6:06 i have 2x server up, becouse TFS dont want go down.
 
I think what he meant is that right before shutdown, server saved itself, and when you did the shutdown it saved again.
 
Nono, it isnt ok when i'm closing server and it saves 2x.
 
that's because the server save in:

Code:
ID_MENU_FILE_SHUTDOWN:

when you press yes, and another time in:

Code:
WM_CLOSE:
WM_DESTROY:

when the windows says to the server that the .exe is closing...

i've already removed these savedata because if you try to close while loading the server your database would be messed, just a hint
:thumbup:
 
So what i should remove? But what if server will crash? (i'm using exception tracer)


And today again all items from houses has gone ;s...

When i was using another engine there wasnt any fault. But in this situation i'm using auto backups per 2 hours ;D So ok, but could Tala check if is there any chance to fix it. ;)
 
Last edited:
So what i should remove? But what if server will crash? (i'm using exception tracer)


And today again all items from houses has gone ;s...

When i was using another engine there wasnt any fault. But in this situation i'm using auto backups per 2 hours ;D So ok, but could Tala check if is there any chance to fix it. ;)

Code:
case WM_CLOSE:
case WM_DESTROY:

are in otserv.cpp... It's supposed to be only called when you close the GUI... I think your problem is with the

Code:
g_game.saveData(true);

at exception.cpp

I've done another save system to my server... thought that it was only happening with me
 
Last edited:
Back
Top