ID:158672
 
Hi, i just want to know how to read each line in a msg and put each line into an array.
Something like:
/mob
robot
var/list/code = list()
var/ccount = 1
verb
Code(C as msg)
while(bleh???)
code[ccount] = //line [ccount]
count++

Thanks in advance.
find each line, you could do this urself by detecting the return key, and then telling it it's the end of the line and put the text before it with copytext() into the array list.

using findtext() you can find the return key... also, \n is the equivalent to return key, use that with findtext() for finding the new line key.
In response to Superbike32
An alternative may be to use an XML library so you can have the items in tags may be easier to do (keyword: maybe).

I used an XML library (forgot whom, but can be found in my project file) to make a basic quest system. You can take a look at http://www.byond.com/members/ GhostAnime?command=view_post&post=49388