28.03.2010, 21:48
I made a logging function for one of my scripts:
Only issue with it is that it isn't including the date or time, nor is it putting the nest string on the next line.
What's wrong with it?
EDIT: I kicked myself from my server and I got this out of my log file:
That's it, nothing else. Why isn't it showing the date or time?
pawn Код:
public WriteToLogFile(string[])
{
new Hour, Minute, Second, Year, Month, Day;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
LogFile = fopen("ACLog.txt", io_append);
new logstring[256];
format(logstring, sizeof(logstring), "[%s-%s-%s at %s:%s:%s] %s \r\n", Year, Month, Day, Hour, Minute, Second, string);
fwrite(LogFile, string);
fclose(LogFile);
}
What's wrong with it?
EDIT: I kicked myself from my server and I got this out of my log file:
Код:
biltong has been kicked by biltong.