Code:
mob/proc/LoadList()
src << output("Loading List","LoginScreen.saveinfo") //Just an output to let me know Im loading a list
var/file_text=file2text("ListFile.txt")
var/seperate_items[] = text2list(file_text,";") // Each semi-colon indicates the end of a line of text
for(var/text_string in seperate_items)
var/list/split_text_string = text2list(text_string,"]") //Each end/right bracket thing indicates a seperator
var/A=split_text_string[2] as text
var/B=split_text_string[1] as text //convert it to text? idk why I just had to to make it work before
src << output("[A] found in [B]","LoginScreen.saveinfo") // more output to let me know an item was found
if(B=="Main")
var/O=text2path(A)
var/atom/a=new O() //creating the object
src << output(a,"LoginScreen.saveinfo")
Problem description:
After working from before, loading items from a text file and placing them in a list (like an inventory?), I somehow screwed up and now it's not loading the list.
I believe this is the broken part, as this does nothing now
if(B=="Main")
var/O=text2path(A)
var/atom/a=new O() //creating the object