SA-MP Forums Archive
Multple Line (" ") - 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: Multple Line (" ") (/showthread.php?tid=71391)



Multple Line (" ") - StrickenKid - 31.03.2009

is it possible to have a text like "text here" on multiple lines because i have ALLOT of text in it.

for example:

Код:
TextDrawCreate(X,Y,"blablablablablabla Line 1
Blablablablabla LINE 2 Blablablablabla LINE 2
Blablablablabla LINE 3 Blablablablabla LINE 3
Blablablablabla LINE 4 Blablablablabla LINE 4
Blablablablabla LINE 5 Blablablablabla LINE 5
Blablablablabla LINE 6 Blablablablabla LINE 6")
when i do something like that i get an error.. any way to do this??


Re: Multple Line (" ") - Pyrokid - 31.03.2009

The only way that I think MIGHT work, because I've never tested it and don't know, is using \r\n. Otherwise, you might have to make more textdraws.


Re: Multple Line (" ") - ICECOLDKILLAK8 - 31.03.2009

You can use ~n~ in text draws


Re: Multple Line (" ") - StrickenKid - 31.03.2009

no i mean
new lines in script

this is how it looks in script:

Код:
TextDrawCreate(X,Y,"jhgjahd;gh;adhg;jahd;gjkha;kdjhgklajhdklgjhalkdjhgklahdkjghlakjdhglkjahdlkgjhaldkjghlakjdfhglkajdhlgkjhadlkfjghlakjdhfglkjahdflkgjhalkdjfghlkajdhglkjahdlkfjghlkajdfgadfgadfgsfdhgsfghdfghsfhsfghdfghsfhsfhsfghsfgh");
what i want is:

Код:
TextDrawCreate(X,Y,"jhgjahd;gh;adhg;jahd;gjkha;kdjhgklajhdklgjhalkd
jhgklahdkjghlakjdhglkjahdlkgjhaldkjghlakjdfhglkajdhlgkjhadlkfjghlakjdhfgl
kjahdflkgjhalkdjfghlkajdhglkjahdlkfjghlkajdfgadfgadfgsfdhgsfghdfghsfhsf
ghdfghsfhsfhsfghsfgh");



Re: Multple Line (" ") - Norn - 31.03.2009

Quote:
Originally Posted by <__Ethan__>
no i mean
new lines in script

this is how it looks in script:

Код:
TextDrawCreate(X,Y,"jhgjahd;gh;adhg;jahd;gjkha;kdjhgklajhdklgjhalkdjhgklahdkjghlakjdhglkjahdlkgjhaldkjghlakjdfhglkajdhlgkjhadlkfjghlakjdhfglkjahdflkgjhalkdjfghlkajdhglkjahdlkfjghlkajdfgadfgadfgsfdhgsfghdfghsfhsfghdfghsfhsfhsfghsfgh");
what i want is:

Код:
TextDrawCreate(X,Y,"jhgjahd;gh;adhg;jahd;gjkha;kdjhgklajhdklgjhalkd
jhgklahdkjghlakjdhglkjahdlkgjhaldkjghlakjdfhglkajdhlgkjhadlkfjghlakjdhfgl
kjahdflkgjhalkdjfghlkajdhglkjahdlkfjghlkajdfgadfgadfgsfdhgsfghdfghsfhsf
ghdfghsfhsfhsfghsfgh");
And he told you ~n~ creates a new line.



Re: Multple Line (" ") - Kinetic - 01.04.2009

Quote:
Originally Posted by Norn
And he told you ~n~ creates a new line.
He would get errors trying to compile because the line is too long.

He should do this.

pawn Код:
new str[270];
new str1[48] = "jhgjahd;gh;adhg;jahd;gjkha;kdjhgklajhdklgjhalkd";
new str2[73] = "jhgklahdkjghlakjdhglkjahdlkgjhaldkjghlakjdfhglkajdhlgkjhadlkfjghlakjdhfgl";
new str3[73] = "kjahdflkgjhalkdjfghlkajdhglkjahdlkfjghlkajdfgadfgadfgsfdhgsfghdfghsfhsf";
new str4[70] = "ghdfghsfhsfhsfghsfgh";
format(str, sizeof(str), "%s~n~%s~n~%s~n~%s", str1, str2, str3, str4);
TextDrawCreate(X,Y, str);



Re: Multple Line (" ") - Daren_Jacobson - 01.04.2009

i believe he is just talking about how ugly it looks in the script, try putting a \ at the end of the line like
pawn Код:
TextDrawCreate(X,Y,"jhgjahd;gh;adhg;jahd;gjkha;kdjhgklajhdklgjhalkd \
jhgklahdkjghlakjdhglkjahdlkgjhaldkjghlakjdfhglkajdhlgkjhadlkfjghlakjdhfgl \
kjahdflkgjhalkdjfghlkajdhglkjahdlkfjghlkajdfgadfgadfgsfdhgsfghdfghsfhsf \
ghdfghsfhsfhsfghsfgh"
);



Re: Multple Line (" ") - StrickenKid - 01.04.2009

Quote:
Originally Posted by Daren_Jacobson
i believe he is just talking about how ugly it looks in the script, try putting a \ at the end of the line like
pawn Код:
TextDrawCreate(X,Y,"jhgjahd;gh;adhg;jahd;gjkha;kdjhgklajhdklgjhalkd \
jhgklahdkjghlakjdhglkjahdlkgjhaldkjghlakjdfhglkajdhlgkjhadlkfjghlakjdhfgl \
kjahdflkgjhalkdjfghlkajdhglkjahdlkfjghlkajdfgadfgadfgsfdhgsfghdfghsfhsf \
ghdfghsfhsfhsfghsfgh"
);
THATS EXACTLY WHAT I WANTED THX!!!


Re: Multple Line (" ") - cyber_punk - 01.04.2009

Thanks for this I just recently ran into the line to long thing and also wondered if there was a way around this.


Re: Multple Line (" ") - Nubotron - 01.04.2009

Quote:
Originally Posted by cyber_punk
Thanks for this I just recently ran into the line to long thing and also wondered if there was a way around this.
It will not fix the "input line too long" error!