Why does this crash my server
#10

The io_append filemode should automatically create the file if it doesn't exists, but the folder ('Logs') has to be created manually. A good practice when working with files is to throw an exception if the file is not found or cannot be opened for some other odd reason. This can be as simple as doing:

pawn Код:
new File:Log = fopen(reportPATH, io_append);

if(!Log)
    return printf("[warning] Failed to open stream: %s", reportPATH);

// Rest of file functions
Reply


Messages In This Thread
Why does this crash my server - by Scripter12345 - 03.04.2012, 20:37
Re: Why does this crash my server - by TzAkS. - 03.04.2012, 20:45
Re: Why does this crash my server - by Scripter12345 - 03.04.2012, 21:43
Re: Why does this crash my server - by captainjohn - 03.04.2012, 21:47
Re: Why does this crash my server - by Scripter12345 - 03.04.2012, 21:55
Re: Why does this crash my server - by jamesbond007 - 03.04.2012, 21:58
Re: Why does this crash my server - by Scripter12345 - 03.04.2012, 22:00
Re: Why does this crash my server - by TzAkS. - 03.04.2012, 22:01
Re: Why does this crash my server - by Scripter12345 - 03.04.2012, 22:10
Re: Why does this crash my server - by Vince - 03.04.2012, 22:11

Forum Jump:


Users browsing this thread: 1 Guest(s)