Stock does'nt work correct...
#6

Look into sscanf,to find what you are wrong,and learn.

Maybe the solution.
pawn Код:
static stock
  s_printX_str[128];
#deine printX(%1,%2) \
  format(s_printX_str,128,(%1),%2); \
  printX_proc()
stock printX(const str[]){
  format(s_printX_str,128,"%s",str);
  printX_proc();
}

stock printX_proc(){
  new Hour, Minute, Second;
new Year, Month, Day;
new LogFile[128], entry[128], File:Log;
gettime(Hour, Minute, Second);
getdate(Year, Month, Day);
format(LogFile, sizeof(LogFile), ServerLog, Day, Month, Year); //>>>>>> RULE 64 <<<<<<
if(!fexist(LogFile))
{ dini_Create(LogFile);
printf("New Log File: %02d-%02d-%04d.txt", Day, Month, Year);
Log = fopen(LogFile, io_append);
format(entry, sizeof(entry), "[%02d:%02d:%02d] %s\r\n", Hour, Minute, Second, s_printX_str);
fwrite(Log, entry);
fclose(Log);
} else
{ format(entry, sizeof(entry), "[%02d:%02d:%02d] % s\r\n", Hour, Minute, Second, s_printX_str);
Log = fopen(LogFile, io_append);
fwrite(Log, entry);
fclose(Log);
}
}
Reply


Messages In This Thread
Stock does'nt work correct... - by Remi-X - 19.06.2009, 13:32
Re: Stock does'nt work correct... - by Correlli - 19.06.2009, 13:58
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 14:04
Re: Stock does'nt work correct... - by Remcconen - 19.06.2009, 14:38
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 14:54
Re: Stock does'nt work correct... - by yezizhu - 19.06.2009, 15:16
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 15:28
Re: Stock does'nt work correct... - by yezizhu - 19.06.2009, 16:04
Re: Stock does'nt work correct... - by Nero_3D - 19.06.2009, 16:26
Re: Stock does'nt work correct... - by Remi-X - 19.06.2009, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)