ID:140118
 
Code:
Team
parent_type = /obj/

var
teamname=""
members=list()
leader=""

proc/save()
var/a=list2params(members)
var/b=src.leader
text2file("[a]","Playersnew/Teams/[src.teamname]/members.txt")
text2file("[b]","Playersnew/Teams/[src.teamname]/leader.txt")


proc/load()
var/file_data = file2text("Playersnew/Teams/[src.teamname]/members.txt")
var/b=params2list(file_data)
src.members+=b
world<<"[b]....[file_data]"

var/file_data2 = file2text("Playersnew/Teams/[src.teamname]/leader.txt")
var/a="[file_data2]"
src.leader=a
world<<"[a]....[file_data2]"


Problem description:

the text2file is writing into the file, when i try to load, it is an empty list?

Edit:the paths were the same just a posting error.
The paths in your load and save routines aren't the same. Look carefully.
In response to Nadrew
edited OP, the path is unfortunately not the error.
text2file() defaults to appending to a file, so old data is never getting removed when you save. You need to use fdel(), or just a savefile format (which will be much easier).
In response to Garthor
i did try using the .sav format but it gave me some stuff about .DLL file cannot be read or something.. ill proceed with your suggestion however and retry with .sav