12.02.2011, 10:29
(
Последний раз редактировалось leong124; 12.02.2011 в 14:46.
)
No.
I just changed the server rules today and the script is the same as yesterday I think.
Strangely, everything works fine yesterday.
Also, everything works at first, but fails after some time.
Is that the problem of writing log?
My local language is 16-bit characters so I use fputchar instead of fwrite.
EDIT:
I've disabled that function but I still get the same problem.
Will that be any problem with GetTickCount if I turn off my PC and turn it on again?
The problem is so weird. :/
I just changed the server rules today and the script is the same as yesterday I think.
Strangely, everything works fine yesterday.
Also, everything works at first, but fails after some time.
Is that the problem of writing log?
pawn Код:
stock WriteLog(const data[],const bool:printlog = true)
{
if(IsFolderExists("/SCFRI/SAdmin/Records/Log/"))
{
new string[130],yy,mm,dd;
getdate(yy,mm,dd);
format(string,sizeof(string),"/SCFRI/SAdmin/Records/Log/%d年%02d月%02d日伺服器紀錄.txt",yy,mm,dd);
new File:serverlog = fopen(string,io_append);
gettime(yy,mm,dd);
format(string,sizeof(string),"[%02d:%02d:%02d] %s",yy,mm,dd,data);
if(printlog) print(string);
strcat(string,"\r\n");
for(new i = 0,k = strlen(string);i < k;i++)
fputchar(serverlog,string[i],false);
fclose(serverlog);
}
return 1;
}
EDIT:
I've disabled that function but I still get the same problem.
Will that be any problem with GetTickCount if I turn off my PC and turn it on again?
The problem is so weird. :/