Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SilverSpook on Wed 29/04/2015 09:15:49

Title: Long Strings Broken Into Multiple Lines?
Post by: SilverSpook on Wed 29/04/2015 09:15:49
Is there a way to have a very long string broken up into multiple lines, in the code?  So that you can read it without having to scroll horizontally in the editor?

I found one thread on this topic but there wasn't a yes or no on this question, as I could gather.

Thanks
Title: Re: Long Strings Broken Into Multiple Lines?
Post by: Slasher on Wed 29/04/2015 09:22:03
Here is an example of cutting text strings up:

Code (ags) Select

DisplayAt(24, 100, 500,  "%s %s %s %s %s", //  %s per line... [ = a line break
" text here",
" text here",
" text here",
" text here",
" text here"); // final line
Title: Re: Long Strings Broken Into Multiple Lines?
Post by: Crimson Wizard on Wed 29/04/2015 09:34:58
Frankly, I did not find this in AGS script.

I usually do:
Code (ags) Select

String s =   "asdasdasdasdasdadsd");
s = s.Append("cv dv df gdf df gdf");
s = s.Append("sdasd sdfsfs f df d");
Title: Re: Long Strings Broken Into Multiple Lines?
Post by: SilverSpook on Wed 29/04/2015 12:59:29
Ok thanks guys.  I settled on the String append method.