Loss of data in the GMX or RESTART -
AlexandreRangelMamut - 04.04.2014
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
Re: Loss of data in the GMX or RESTART -
biker122 - 04.04.2014
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.
Re: Loss of data in the GMX or RESTART -
AlexandreRangelMamut - 04.04.2014
+1 rep
But friend, and if the server experience a crash?? I do not own MySQL to save the data.
Re: Loss of data in the GMX or RESTART -
Pottus - 04.04.2014
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.
Re: Loss of data in the GMX or RESTART -
AlexandreRangelMamut - 04.04.2014
But friend, and if it happens to my HOST suffer attacks, or host fall??
Re: Loss of data in the GMX or RESTART -
Pottus - 04.04.2014
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.
Re: Loss of data in the GMX or RESTART -
AlexandreRangelMamut - 04.04.2014
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.
Re: Loss of data in the GMX or RESTART -
yvoms - 04.04.2014
|You probbaly miss a save or loading function i would compare the 2 scripts and look for diffrences.|
Goodluck with your script!
Re: Loss of data in the GMX or RESTART -
AlexandreRangelMamut - 04.04.2014
The problem is that I have many updates in GAMEMODE ADDED. What remains to me is REASSEMBLING GM, and go testing.
Re: Loss of data in the GMX or RESTART -
Basssiiie - 04.04.2014
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.