My ban/kick log won't make a new line
#1

Hello, I've searched a-bit about why my kick/ban logs don't make a new line. it just stack up all the bans/kicks on one line untill it's to much then it take a new one.

This is my function for ban/kick log:

Код:
stock KickLog(string[]){
    new entry[128], day,month,year,second,minute,hour;
    gettime(hour, minute, second);
    getdate(year, month, day);
    format(entry, sizeof(entry), "%i-%i-%i[%i:%i:%i]%s \n",year, month, day, hour, minute, second, string);
    new File:hFile = fopen("/LOGS/kicks.log", io_append);
    fwrite(hFile, entry);
    fclose(hFile);
}
Thanks for all answers
Reply
#2

Try
Код:
\r\n
afaik, "\r" makes sure the line starts at the beginning. It works seamlessly for me.
Reply
#3

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Код:
\r\n
Thank you, will check that and thanks for the fast answer!
Reply
#4

\n i believe only works on linux as \r\n is the windows line break
(heard something like that)
So meaning if u opened on a linux with \n it would work but on notepad for windows no
Reply
#5

Quote:
Originally Posted by SnG.Scot_MisCuDI
Посмотреть сообщение
\n i believe only works on linux as \r\n is the windows line break
(heard something like that)
So meaning if u opened on a linux with \n it would work but on notepad for windows no
Okay, thanks for that information You'll learn something new everyday as a scripter ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)