Log system
#3

With y_ini:
pawn Код:
stock SLog(stringtext1[],stringtext2[],name[])
{
    new INI:file = INI_Open(name);
    INI_WriteString(file,stringtext1,stringtext2);
    INI_Close(file);
    return 1;
}
//That stock will write "stringtext1 = stringtext2" inside "name" file.
//f.e:
stock STimeDate()
{
    new Times[2],Dates[3],string[64];
    gettime(Times[0],Times[1]);
    getdate(Dates[0],Dates[1],Dates[2]);
    CostumFormat(string,"%d/%d/%d - %d:%d",Dates[2],Dates[1],Dates[0],Times[0],Times[1]);
    return string;
}

//Somewhere
SLog(STimeDate(),"blahblahblah","Testfile.ini")
//That code will write "day/month/year - hour:minute = blahblahblah" inside "Testfile.ini" file.
Reply


Messages In This Thread
Log system - by Kingunit - 02.08.2011, 02:11
Re: Log system - by Laronic - 02.08.2011, 02:19
Re: Log system - by =WoR=Varth - 02.08.2011, 02:20
Re: Log system - by Kingunit - 02.08.2011, 02:24
Re: Log system - by PGTips - 02.08.2011, 02:30
Re: Log system - by Kingunit - 02.08.2011, 02:30
Re: Log system - by Kingunit - 02.08.2011, 02:34
Re: Log system - by Famalamalam - 02.08.2011, 02:36
Re: Log system - by PGTips - 02.08.2011, 02:39
Re: Log system - by Famalamalam - 02.08.2011, 02:43
Re: Log system - by Kingunit - 02.08.2011, 02:50
Re: Log system - by Famalamalam - 02.08.2011, 02:52

Forum Jump:


Users browsing this thread: 1 Guest(s)