My ban/kick log won't make a new line - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: My ban/kick log won't make a new line (
/showthread.php?tid=355440)
My ban/kick log won't make a new line -
Ranama - 30.06.2012
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
Re: My ban/kick log won't make a new line -
ReneG - 30.06.2012
Try
afaik, "\r" makes sure the line starts at the beginning. It works seamlessly for me.
Re: My ban/kick log won't make a new line -
Ranama - 30.06.2012
Quote:
Originally Posted by VincentDunn
|
Thank you, will check that and thanks for the fast answer!
Re: My ban/kick log won't make a new line -
SnG.Scot_MisCuDI - 30.06.2012
\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
Re: My ban/kick log won't make a new line -
Ranama - 30.06.2012
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 ^^