Function crash the server.
#6

It's crashing on fwrite so maybe the file doesn't exist try this...

PHP код:
WriteLogs(const playername[], file[30], const author[], const reason[], const other[])
{
    static 
daymonthhourminutesecondeyearstringW[190];
    if(
strfind(file".log"false0) == -1format(filesizeof(file), "%s.log"file);
    
format(filesizeof(file), "/Logs/%s"file);
    if(!
fexist(file)) {
       new 
File:pos=fopen(fileio_write);
       
fclose(pos);
    }
    new 
File:pos=fopen(fileio_append);
    
gettime(hourminuteseconde);
    
getdate(yearmonthday);
    
format(stringW,sizeof(stringW),"\r\n[%02i/%02i/%02i] %02i:%02i:%02i | %s %s %s : %s"daymonthyearhourminutesecondeauthorreasonplayernameother);
    
fwrite(pos,stringW);
    
fclose(pos);

Reply


Messages In This Thread
Function crash the server. - by Dayrion - 21.06.2016, 15:44
Re: Function crash the server. - by ATGOggy - 21.06.2016, 15:47
Re: Function crash the server. - by Dayrion - 21.06.2016, 15:49
Re: Function crash the server. - by Konstantinos - 21.06.2016, 15:51
Re: Function crash the server. - by Dayrion - 21.06.2016, 16:00
Re: Function crash the server. - by jlalt - 21.06.2016, 16:04
Re: Function crash the server. - by Konstantinos - 21.06.2016, 16:08
Re: Function crash the server. - by SecretBoss - 21.06.2016, 16:12
Re: Function crash the server. - by Dayrion - 21.06.2016, 16:33
Re: Function crash the server. - by Dayrion - 21.06.2016, 17:25

Forum Jump:


Users browsing this thread: 1 Guest(s)