13.01.2013, 17:05
What can cause that, the server closes very often, if there is 1 player or more. Server.log doesnt show anything strange. It closes randomly. What can the problem be?
It will print information about where the crash was occured to the server_log
|
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;
}