ID:263018
 
Code:
proc/Save_GM_Names()
var/savefile/F = new ("Staff.sav")
F["GM Names"] << Staff_Names
F["Banned Players"] << BP
F["Muted Players"] << Mute
proc/Load_GM_Names()
if(fexists("Staff.sav"))
var/savefile/F = new ("Staff.sav")
F["GM Names"] >> Staff_Names
F["Banned Players"] >> BP
F["Muted Players"] >> Mute

world
Del()
Save_GM_Names()
world.log << "save GM names created"
..()
New()
Load_GM_Names()
world.log << "loading Load gm names"
..()


Problem description:
Nothing here is working, it's not created, it's not telling me anything.
It wouldn't have anything to do with leaving out Read(F) and Write(F) would it?
In response to Crzylme
I make simple procs for storing data in the same fashion, I don't see why it's not working for him. Using the << and >> savefile operators are already taking advantage of Read and Write, as far as I know.
In response to Detnom
Well, since he's not overriding the Read() and Write(), and in the DM Guide, almost everone of them included Write() and Read()
In response to Crzylme
Ok, going by what you said, I added Read() and Write(). In doing so it give 2 errors, saying Read and Write are undefined procs...

proc/Save_GM_Names()
var/savefile/F = new ("Staff.sav")
F["GM Names"] << Staff_Names
F["Banned Players"] << BP
F["Muted Players"] << Mute
Write(F)
proc/Load_GM_Names()
if(fexists("Staff.sav"))
var/savefile/F = new ("Staff.sav")
F["GM Names"] >> Staff_Names
F["Banned Players"] >> BP
F["Muted Players"] >> Mute
Read(F)


Perhaps I'm calling this wrong?
In response to Pyro_dragons
Read() and Write() write all vars that are able to be read/write. (This excludes stuff like x,y,z)

I believe it belongs to strictly to atoms, so it will do no good here.


To save a list perhaps try


File["index_name"] << list.Copy()
In response to Papoose
I believe, with lists, you need something like:

if(isnull(LISTNAME)) LISTNAME = new/list


In the load proc, for all lists.
In response to Tiberath
See if this works:

proc
Save_GM_Names()
var/savefile/F = new("Staff.sav")
if(Staff_Names) F["GM Names"] << Staff_Names
if(BP) F["Banned Players"] << BP
if(Mute) F["Muted Players"] << Mute

Load_GM_Names()
if(fexists("Staff.sav"))
var/savefile/F = new ("Staff.sav")
if(F["GM Names"]) F["GM Names"] >> Staff_Names
if(F["Banned Players"]) F["Banned Players"] >> BP
if(F["Muted Players"]) F["Muted Players"] >> Mute

world
New()
..()
Load_GM_Names()
Del()
Save_GM_Names()
..()
In response to Y2kEric
proc
Save_GM_Names()
var/savefile/F = new("Staff.sav")
F["GM Names"] << Staff_Names
F["Banned Players"] << BP
F["Muted Players"] << Mute

Load_GM_Names()
var/savefile/F = new ("Staff.sav")
F["GM Names"] >> Staff_Names
F["Banned Players"] >> BP
F["Muted Players"] >> Mute
if(isnull(Staff_Names)) Staff_Names = new/list()
if(isnull(BP)) BP = new/list()
if(isnull(Mute)) Mute = new/list()

world
New()
..()
Load_GM_Names()
Del()
Save_GM_Names()
..()


That should do the trick.
Though why you want to save staff members to a save file is beyond me. Unless you're the perm host. Major Security Risk. If there is no hash.