Page 1 of 1

Multiline text problem

PostPosted: Wed Sep 22, 2010 10:20 am
by Leif
Hi :)

The problem is:

- Ihave text file with text strings like : ---------=---------=---------=---------\n=---------=---------=---------=-------\n--=---------=---------=
- I load this strings into global string array
- when i do

Code: Select all
strcpy(actor.text, array[0]);


it displays text in ONE line (instead of three desired )

What's wrong ? :?:

Re: Multiline text problem

PostPosted: Wed Sep 22, 2010 11:56 am
by DilloDude
\n is the script editor code for a newline character. Entering it into your text file will literally store the characters \n, and when you load it, you load those characters.
To load them as newline characters, you must put them in the text file as actual new lines.

Re: Multiline text problem

PostPosted: Wed Sep 22, 2010 1:21 pm
by Leif
Is there any way to divide one string into several lines at runtime ?