Loss of data in the GMX or RESTART
#1

I have a problem else. I'm using PPCTRUCKING gamemode. What happens is this ... all players playing online, updating the scores ...

Happen if the server goes down, or so I take a RESTART, he loses everything that was saved.

He sometimes even "RESET" the account of the player who is online.

A friend told me to put rescue OnGameModeExit (), and I did, but does not solve.

Quote:

public OnGameModeExit() {
KillTimer(LoteriaX);

for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerFile_Save(i);
}

for(new i = 0; i < MAX_HOUSES; i++)
{
HouseFile_Save(i);
}

for(new i = 0; i < MAX_BUSINESS; i++)
{
BusinessFile_Save(i);
}

for(new i = 0; i < MAX_PLAYERS; i++)
{
BankFile_Save(i);
}

Could anyone help me? thank you
Reply
#2

It happens.
Hint : If you're restarting the server, first ask everyone to quit and relog in after the restart. Else,
Make /kickall command and kick everyone from the server before restarting.
Reply
#3

+1 rep

But friend, and if the server experience a crash?? I do not own MySQL to save the data.
Reply
#4

Okay, what you need to do is what biker said kick everyone off the server before doing any server restarting actions that will save their stats.
Reply
#5

But friend, and if it happens to my HOST suffer attacks, or host fall??
Reply
#6

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
[uL]Pottus and if a server experience a crash ?
Shall he add a kick under ongamemodeexit?
Not much you can do about that except save userfiles every 5 minutes to minimize rollback or find the source of the server crash. I've only experienced one crash in months of operation on my server so if the server is crashing there is some issues with the code.
Reply
#7

I tested with the original GM, before editing, and original GM does not have this error.

Now I discouraged to find where I went wrong.
Reply
#8

|You probbaly miss a save or loading function i would compare the 2 scripts and look for diffrences.|
Goodluck with your script!
Reply
#9

The problem is that I have many updates in GAMEMODE ADDED. What remains to me is REASSEMBLING GM, and go testing.
Reply
#10

What you could try is installing this plugin, which will spit out the locations of where your script crashed when a crash does actually happen.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)