SA-MP Forums Archive
\n - newline doesnt work? :S - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: \n - newline doesnt work? :S (/showthread.php?tid=101126)



\n - newline doesnt work? :S - Baff - 08.10.2009

Code:
public BugLog(string[])
{
	new entry[128];
	new File:hFile;
	hFile = fopen("bug.ini", io_append);
	format(entry, sizeof(entry), "%s\n",string);
	fwrite(hFile, entry);
	fclose(hFile);
}
it should work right?...but it doesnt work properly :S
it doesnt DO NEWLINE(thingie) :S

it saves everything in 1 line :S but i want every time it writes...to write it in a new line :S

this is WHAT should happen :S
Code:
			format(string, sizeof(string), "|%s| BUG: %s ))", sendername ,result);
			BugLog(string);
sry...last 2 hours my english is kinda shitty because i am nervous about smthing :S


Re: \n - newline doesnt work? :S - noahg - 08.10.2009

try \r\n


Re: \n - newline doesnt work? :S - Baff - 08.10.2009

still the same :S

but wtf -.-' in .log writes in 1 LINE but when i copy it here then it is like this :O
|Baff_Bloomer| BUG: aaasdasda ))
|Baff_Bloomer| BUG: ishauidas ))
|Baff_Bloomer| BUG: sjadjsjdja ))




Re: \n - newline doesnt work? :S - UsaBoy91 - 08.10.2009

Yes , because there's a square ( don't use notepad , use wordpad )


Re: \n - newline doesnt work? :S - woot - 08.10.2009

Notepad indeed doesn't support that new lining.
I personally use Notepad++ and it works great (: