Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 1,258 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to make a Linefeed at a written Text File? #300286
12/01/09 08:32
12/01/09 08:32
Joined: Jul 2007
Posts: 53
Germany
Henning Offline OP
Junior Member
Henning  Offline OP
Junior Member

Joined: Jul 2007
Posts: 53
Germany
Hello,

does anybody know how to write a linefeed (new line) with file_str_write into a text file? "\n" does not work and file_asc_write(fhandle,10) does not work either. There just appears a rectangle, I think that represents non interpretable text. All written data is always stored one after the other, that is badly readable.

Thanks
Henning

Re: How to make a Linefeed at a written Text File? [Re: Henning] #300290
12/01/09 09:32
12/01/09 09:32
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline
Member
seecah  Offline
Member

Joined: Apr 2009
Posts: 248
Philippines
Did you open the text file through notepad.exe.. If yes then I think that's normal that you just can see a rectangle for which I don't know what the reason is. I've tried that also, try to download notepad++ and there you can see the exact contents of the file.

Indeed "\n" works but it's just that notepad.exe can't interpret it perhaps..

"\n" is just enough to write a linefeed..

Hope that helps..



Can't is not an option™
Re: How to make a Linefeed at a written Text File? [Re: seecah] #300292
12/01/09 09:48
12/01/09 09:48

M
mercuryus
Unregistered
mercuryus
Unregistered
M



file_asc_write(fhandle,10) lf
file_asc_write(fhandle,13) cr

(maybe 13->10)

Re: How to make a Linefeed at a written Text File? [Re: ] #300314
12/01/09 13:58
12/01/09 13:58
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
bit of a hack, but what i used to do is simply:
Code:
var filehandle = file_open_write ("myfile.txt");
file_str_write(filehandle,"
"); // Yes, this is indeed on a new line...
file_close (filehandle);



simple as that tongue hahahaaa
regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: How to make a Linefeed at a written Text File? [Re: seecah] #300436
12/02/09 15:05
12/02/09 15:05
Joined: Jul 2007
Posts: 53
Germany
Henning Offline OP
Junior Member
Henning  Offline OP
Junior Member

Joined: Jul 2007
Posts: 53
Germany
Hi,
thank you all, simple solution, seecah is right, you do not see it with notepad, with Wordpad or Word, you see it.

Thanx
Henning


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1