Subdirectory Files
#1

I'm currently trying to log everything into the logs folder but it wont let me do it. My log function is:

pawn Код:
Log(sz_fileName[], sz_input[]) {

    new
        sz_logEntry[156],
        i_dateTime[2][3],
        File: fileHandle = fopen(sz_fileName, io_append);

    gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
    getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);

    format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
    fwrite(fileHandle, sz_logEntry);
    return fclose(fileHandle);
}
and I'm using

pawn Код:
Log("logs/test.log", "hi");
Any help? It's like the function doesn't work at all when I add a path.
Reply


Messages In This Thread
Subdirectory Files - by andrew4699 - 16.09.2011, 03:36
Re: Subdirectory Files - by dowster - 16.09.2011, 03:41
Re: Subdirectory Files - by andrew4699 - 16.09.2011, 03:47
Re: Subdirectory Files - by [L3th4l] - 16.09.2011, 03:53
Re: Subdirectory Files - by andrew4699 - 16.09.2011, 04:13

Forum Jump:


Users browsing this thread: 1 Guest(s)