SA-MP Forums Archive
Cut a line in two - 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)
+--- Thread: Cut a line in two (/showthread.php?tid=282284)



Cut a line in two - Black_Sun1 - 10.09.2011

Ok i'm having a problem with strings, i reached the limit but i need to put more words into the string!
So, my question is:
How to cut a string in two lines and simply put it under the first one?
pawn Code:
new Adminhelp4[] = "/BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH"
This line above is too long, so can i cut it like this?
pawn Code:
new Adminhelp4[] = "/BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH
 /BLAH /BLAH /BLAH /BLAH /BLAH"
Plz help!


Re: Cut a line in two - Black_Sun1 - 10.09.2011

*BUMP*


Re: Cut a line in two - =WoR=Varth - 10.09.2011

Yes you can.


Re: Cut a line in two - Kingunit - 10.09.2011

Quote:
Originally Posted by varthshenon
View Post
Yes you can.
Quote:

So, my question is:
How to cut a string in two lines and simply put it under the first one?

He is also asking how ...


Re: Cut a line in two - iggy1 - 10.09.2011

pawn Code:
new Adminhelp4[] = "/BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH\
 /BLAH /BLAH /BLAH /BLAH /BLAH"
;
Use a '\' at the end of the line. This is needed to carry the string to the next line.


Re: Cut a line in two - =WoR=Varth - 10.09.2011

Quote:
Originally Posted by Kingunit
View Post
He is also asking how ...
Quote:
Originally Posted by Black_Sun1
View Post
This line above is too long, so can i cut it like this?
pawn Code:
new Adminhelp4[] = "/BLAH /BLAH /BLAH /BLAH /BLAH /BLAH /BLAH
 /BLAH /BLAH /BLAH /BLAH /BLAH"
He did already.
Oh, I thought there's \ already there.