ID:159468
 
I'm trying to come up with a proc that will take a long string and shorten it into multi-lines if its longer then a selected number.
For that, all you need is a for loop and the copytext() proc.
In response to Popisfizzy
Ok. I'll play around with it.
In response to Lundex
Ok, not working. Help plz.
In response to Lundex
proc/reformat(text, characters)
var/length = length(text) //Store the length of the text.
for(var/a = 1, a <= length, a += characters)
text = copytext(text, 1, a) + "\n" + copytext(text, a + 1)
a ++
length ++

See if that works. text is the text to reformat, and characters is the number of characters to start adding the linebreaks at.
In response to Popisfizzy
Thanks...