ID:268153
 
ok so I have..
stat("Messages",src.Message)
and in this staat I give it random messages, How would I
make it the text go down to the next line?
Now: TestTestTest
Example:
Test
Test
Test

Also, when it gets too far down and when it reaches the edge of the screen, to where you would have to start to scroll down, is there a way to make the message null when it gets down that far?
I'm assuming each instance of Test in that example was a seperate seperate part in a list. If you are trying to do what I think you are trying to do, yes it is possible like so:

mob/Stat()
if(statpanel("Some Panel"))
//other stuff in this panel
if(messages.len)
stat("Messages",messages[1])
if(messages.len>=2)
for(var/index=2,index<=messages.len,index++)
stat("",messages[index])


As for the other question, no you cannot know how much space a player has on his window so you cannot determine where to stop it short before having a scrollbar.
i dont know if dm has this but at the end of eash message add

--code--
+ "\n" +
--end--

if it works it will give it a new line but i think if this work it might only be for text formating not stat panels.
In response to Loduwijk
whats .lin?
In response to Kasumi Tomonari
It's len, and it's a variable that lists have which tells how long they are (how many things they contain).

The example shows "Messages" along with the first thing in the list if the list does have anything in it. Then if the list still has more messages in it, the for loop will go through each one and add that in too.
In response to Loduwijk
I got it working, another way, but still, its working XD
and yes u can check how many lines there are in a text
XD
In response to Kasumi Tomonari
I never said anything about checking number of lines in text and you never asked about that. You asked if you can check to see if something is long enough to warrent a scroll bar, and you cannot do that.