File function newline (\n) problem
#1

Well i've never realy needed to use the native file functions untill now, i need to make some logs. However whenever i use a newline charachter instead of printing on a new line its printing to the same line. Where the newline is meant to be there is a rectangle symbol (don't know the name sorry). I cant post the symbol. (it prints a newline on the forum). I know its probably a silly problem but if someone has the solution i'd appreciate it alot.
Heres some example code,
pawn Код:
public OnPlayerText(playerid, text[])
{
    new
        File:tfile = fopen("chatlog.txt", io_append);
    format(text, 128, "%s\n", text);
    fwrite(tfile, text);
    fclose(tfile);
    return 1;
}
Thanks in advance.
Reply


Messages In This Thread
File function newline (\n) problem - by iggy1 - 21.12.2010, 14:30
Re: File function newline (\n) problem - by The_Gangstas - 21.12.2010, 14:37
Re: File function newline (\n) problem - by iggy1 - 21.12.2010, 14:40
Re: File function newline (\n) problem - by Marcel - 21.12.2010, 16:21
Re: File function newline (\n) problem - by Face9000 - 21.12.2010, 16:27

Forum Jump:


Users browsing this thread: 1 Guest(s)