24.09.2018, 16:03
When I start the server and after about 30 minutes the server crashes.
and the Crashdetect plugin detects errors like this:
AND
and the Crashdetect plugin detects errors like this:
Код:
[06:19:35] [debug] #1 00166074 in SaveFamilies () at f:\SAMPSERVER\IRPS Baru\samp03\gamemodes\b.pwn:23389 [06:19:35] [debug] #2 00678ae4 in public @yT_300000_SaveAccountsUpdate () at f:\SAMPSERVER\IRPS Baru\samp03\gamemodes\b.pwn:102046
PHP код:
SaveFamilies()
{
new idx = 1;
new File: file2;
while (idx < sizeof(FamilyInfo))
{
new coordsstring[512];
format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%d|%d|%d|%f|%f|%f|%d|%d|%d|%s|%s|%s|%s|%s|%s|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
FamilyInfo[idx][FamilyTaken],
FamilyInfo[idx][FamilyName],
FamilyInfo[idx][FamilyMOTD],
FamilyInfo[idx][FamilyLeader],
FamilyInfo[idx][FamilyBank],
FamilyInfo[idx][FamilyCash],
FamilyInfo[idx][FamilyUSafe],
FamilyInfo[idx][FamilySafe][0],
FamilyInfo[idx][FamilySafe][1],
FamilyInfo[idx][FamilySafe][2],
FamilyInfo[idx][FamilyPot],
FamilyInfo[idx][FamilyCrack],
FamilyInfo[idx][FamilyMats],
FamilyInfo[idx][FamilyRank1],
FamilyInfo[idx][FamilyRank2],
FamilyInfo[idx][FamilyRank3],
FamilyInfo[idx][FamilyRank4],
FamilyInfo[idx][FamilyRank5],
FamilyInfo[idx][FamilyRank6],
FamilyInfo[idx][FamilyMembers],
FamilyInfo[idx][FamilyMaxSkins],
FamilyInfo[idx][FamilySkins][0],
FamilyInfo[idx][FamilySkins][1],
FamilyInfo[idx][FamilySkins][2],
FamilyInfo[idx][FamilySkins][3],
FamilyInfo[idx][FamilySkins][4],
FamilyInfo[idx][FamilySkins][5],
FamilyInfo[idx][FamilySkins][6],
FamilyInfo[idx][FamilySkins][7],
FamilyInfo[idx][FamilyColor],
FamilyInfo[idx][FamilyTurfTokens],
FamilyInfo[idx][FamilyGuns][0],
FamilyInfo[idx][FamilyGuns][1],
FamilyInfo[idx][FamilyGuns][2],
FamilyInfo[idx][FamilyGuns][3],
FamilyInfo[idx][FamilyGuns][4],
FamilyInfo[idx][FamilyGuns][5],
FamilyInfo[idx][FamilyGuns][6],
FamilyInfo[idx][FamilyGuns][7],
FamilyInfo[idx][FamilyGuns][8],
FamilyInfo[idx][FamilyGuns][9]);
if(idx == 1)
{
file2 = fopen("families.cfg", io_write);
}
else
{
file2 = fopen("families.cfg", io_append);
}
fwrite(file2, coordsstring); // ERROR LINE: 23389
idx++;
}
fclose(file2);
if(GMOFF == 1)
{
print("Semua family telah disimpan");
}
return 1;
}
PHP код:
Timer:SaveAccountsUpdate[300000]() //ERROR LINE: 102046
{
new playerip[32];
foreach(Player, i)
{
PlayerInfo[i][pInt] = GetPlayerInterior(i);
PlayerInfo[i][pVW] = GetPlayerVirtualWorld(i);
PlayerInfo[i][pChar] = PlayerInfo[i][pModel];
GetPlayerIp(i, playerip, sizeof(playerip));
format(PlayerInfo[i][pIP], 32, "%s", playerip);
GetPlayerPos(i, PlayerInfo[i][pPos_x], PlayerInfo[i][pPos_y], PlayerInfo[i][pPos_z]);
GetPlayerFacingAngle(i, PlayerInfo[i][pPos_r]);
OnPlayerStatsUpdate(i);
}
SaveFamilies();
SaveFamiliesHQ();
}