14.01.2013, 10:22
Quote:
It will print information about where the crash was occured to the server_log
|
[15:22:46] [debug] Server crashed while executing UFFtest.amx
[15:22:46] [debug] AMX backtrace:
[15:22:46] [debug] #0 native fwrite () [00405710] from samp-server.exe
[15:22:46] [debug] #1 00002568 in ?? () from UFFtest.amx
[15:22:46] [debug] #2 00002838 in ?? () from UFFtest.amx
[15:22:46] [debug] #3 00113858 in public checklevel () from UFFtest.amx
[15:22:46] [debug] System backtrace:
[15:22:47] [debug] #0 004923e0 in ?? () from C:\Users\Pasha\Desktop\Ultra Fun Freeplay\samp-server.exe
[15:22:47] [debug] #1 0040534e in ?? () from C:\Users\Pasha\Desktop\Ultra Fun Freeplay\samp-server.exe
It writes something about checklevel, so here is checklevel fuction(it is called by timer every 1 minute)
pawn Код:
OnGameModeInit()
{
SetTimer("checklevel",60000,1);
}
forward checklevel();
public checklevel()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
GetPlayerName(i,pname,sizeof(pname));
format(hourss, sizeof(hourss), "%s-hours", pname);
format(minutess, sizeof(minutess), "%s-minutes", pname);
if(!dini_Isset("PLEVELS.txt",hourss) || !dini_Isset("PLEVELS.txt",minutess))
{
dini_IntSet("PLEVELS.txt",hourss,0);
dini_IntSet("PLEVELS.txt",minutess,1);
}
else
{
if(dini_Int("PLEVELS.txt",minutess)<59)
{
dini_IntSet("PLEVELS.txt",minutess,dini_Int("PLEVELS.txt",minutess)+1);
}
if(dini_Int("PLEVELS.txt",minutess)>=59)
{
dini_IntSet("PLEVELS.txt",hourss,dini_Int("PLEVELS.txt",hourss)+1);
dini_IntSet("PLEVELS.txt",minutess,0);
}
}
}
}
return 1;
}