Trying to write /reports to file
#3

Quote:
Originally Posted by KillerStrike23
Посмотреть сообщение
pawn Код:
public SaveToFile(filename[],text[]){
    #if defined SAVE_LOGS
    new File:File filepath[128], string[128], year,month,day, hour,minute,second;
    getdate(year,month,day); gettime(hour,minute,second);
    format(filepath,sizeof(filepath),"Thepath/%s.txt",filename);
    File = fopen(filepath,io_append);
    format(string,sizeof(string),"[%d.%d.%d %d:%d:%d] %s\r\n",day,month,year,hour,minute,second,text);
    fwrite(File,string);
    fclose(File);
    #endif
    return 1;}
then under the last SendClientMessage use this
PHP код:
SaveToFile("Reports",string); 
When you say to put that under the last sendclientmessage do you mean in dcmd_report?
Compiled:
warning 235: public function lacks forward declaration (symbol "SaveToFile")
Line 165 which is:
Код:
public SaveToFile(filename[],text[]){
EDIT:
Nevermind. Just needed to add
forward SaveToFile(filename[],text[]);
Reply


Messages In This Thread
Trying to write /reports to file - by Brandondw8 - 14.05.2014, 19:53
Re: Trying to write /reports to file - by KillerStrike23 - 14.05.2014, 19:58
Re: Trying to write /reports to file - by Brandondw8 - 14.05.2014, 20:03
Re: Trying to write /reports to file - by Brandondw8 - 14.05.2014, 20:07
Re: Trying to write /reports to file - by awsomedude - 14.05.2014, 21:00
Re: Trying to write /reports to file - by Brandondw8 - 14.05.2014, 23:28
Re: Trying to write /reports to file - by Brandondw8 - 15.05.2014, 00:32
Re: Trying to write /reports to file - by KillerStrike23 - 15.05.2014, 03:47
Re: Trying to write /reports to file - by Brandondw8 - 15.05.2014, 04:42
Re: Trying to write /reports to file - by Brandondw8 - 15.05.2014, 07:45

Forum Jump:


Users browsing this thread: 1 Guest(s)