Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: BD on Tue 23/04/2019 00:01:40

Title: Error ( max line length =500)
Post by: BD on Tue 23/04/2019 00:01:40
Hello!

I'm a bit puzzled at my error at the moment. I'm using a label to display text when prompted and I'm receiving the 'Line too long (max line length =500) error. Now, the text I'm using is a good chunk ; around 150 , obviously not close to the cap. My script works in other rooms just fine so I'm not sure what the problem is! It's possible I skipped over a post that had this same issue ; if that's the case just point me in the right direction!

I'm using this (lbltext is my label name)
Code (ags) Select
lbltext.Text="150 crappy words";
Title: Re: Error ( max line length =500)
Post by: Khris on Tue 23/04/2019 00:06:48
You're probably missing a closing quote somewhere in your script, which makes AGS parse the entire rest of it as a single line of text, which produces the error.
Title: Re: Error ( max line length =500)
Post by: BD on Tue 23/04/2019 03:31:42
Uh oh, turns out I was looking at word count and not a character count.

Sorry for wasting your time on that one  :embarrassed:
Title: Re: Error ( max line length =500)
Post by: Crimson Wizard on Tue 23/04/2019 14:02:23
BD, if you have a long text line you may assign it in parts:
Code (ags) Select

String s = "long text part 1";
s = s.Append("long text part 2");
s = s.Append("long text part 3");
lbltext.Text = s;