[Tutorial] Criando Sistema de Logs.
#8

Quote:
Originally Posted by Dr_Pawno
Посмотреть сообщение
Prefiro o Meu =D

pawn Код:
#define PastaLogs "Logs/"

stock SetLog(LogName[], Text[])
{
    new LogFile[64], File:Log, Write_Text[128], Hoje[6];
    format(LogFile, sizeof(LogFile), "%s%s.txt", PastaLogs, LogName);
    if(fexist(LogFile)) Log = fopen(LogFile, io_append);
    else Log = fopen(LogFile, io_write);
    getdate(Hoje[2], Hoje[1], Hoje[0]);
    gettime(Hoje[3], Hoje[4], Hoje[5]);
    format(Write_Text, sizeof(Write_Text), "[%02d/%02d/%04d - %02d:%02d:%02d] %s\r\n", Hoje[0], Hoje[1], Hoje[2], Hoje[3], Hoje[4], Hoje[5], Text);
    fwrite(Log, Write_Text);
    fclose(Log);
}
format(LogFile, sizeof(LogFile), "%s%s.txt", PastaLogs, LogName);
??
pawn Код:
format(LogFile, sizeof(LogFile), ""PastaLogs"%s.txt",  LogName);
wtf;;;;;
Reply


Messages In This Thread
Criando Sistema de Logs. - by RebeloX - 28.10.2011, 19:21
Re: Criando Sistema de Logs. - by steki. - 28.10.2011, 19:23
Re: Criando Sistema de Logs. - by [O.z]Caroline - 28.10.2011, 19:29
Re: Criando Sistema de Logs. - by steki. - 28.10.2011, 19:32
Re: Criando Sistema de Logs. - by Dr_Pawno - 28.10.2011, 20:13
Re: Criando Sistema de Logs. - by [O.z]Caroline - 28.10.2011, 20:15
Re: Criando Sistema de Logs. - by RebeloX - 28.10.2011, 20:50
Re: Criando Sistema de Logs. - by Ricop522 - 28.10.2011, 21:33
Re: Criando Sistema de Logs. - by Dr_Pawno - 28.10.2011, 21:39
Re: Criando Sistema de Logs. - by RebeloX - 28.10.2011, 21:43

Forum Jump:


Users browsing this thread: 4 Guest(s)