[Resolved] write newline to a file?

I’m writing some output to a file using ‘file:write(itemString)’ and want to include a newline so that when I open it in notepad it’s more user readable.

I thought including \n at the end of my string would work but it appears this is not the case.

Is it possible to include some form of carriage return/linefeed/newline in the write command?

kind regards,

Gareth
wickedsprites.com [import]uid: 51494 topic_id: 30580 reply_id: 330580[/import]

\n should work no problem (It did for me using a quick test).

You could also try \r\n, as some text editors will prefer this format, but either should be valid new line characters for file I/O. [import]uid: 134101 topic_id: 30580 reply_id: 122511[/import]

Thanks Ntero,

that’s the badger.

Stupidly I’d tried \n\r but not the other way around.

Feel fee to tap me up for promo codes on my next release, which will hopefully be sometime in October.

Kind regards,

Gareth
wickedsprites.com [import]uid: 51494 topic_id: 30580 reply_id: 122522[/import]

\n should work no problem (It did for me using a quick test).

You could also try \r\n, as some text editors will prefer this format, but either should be valid new line characters for file I/O. [import]uid: 134101 topic_id: 30580 reply_id: 122511[/import]

Thanks Ntero,

that’s the badger.

Stupidly I’d tried \n\r but not the other way around.

Feel fee to tap me up for promo codes on my next release, which will hopefully be sometime in October.

Kind regards,

Gareth
wickedsprites.com [import]uid: 51494 topic_id: 30580 reply_id: 122522[/import]