ID:263682
 
Code:
world
New()
var/savefile/F = new("World.sav")
var/mob/WorldSav/W = new/mob/WorldSav()
W.Read(F)
GMs = W.SGMs
Admins = W.SAdmins
del(W)
..()
Del()
var/savefile/F = new("World.sav")
var/mob/WorldSav/W = new/mob/WorldSav()
W.SGMs = GMs
W.SAdmins = Admins
W.Write(F)
del(W)
..()
mob/WorldSav
var/list/SGMs = list()
var/list/SAdmins = list()
Read()
..()
Write()
..()


Problem description:
I'm trying to save some world vars. I tried the typical way, (Defining a savefile, F["GMs"] << GMs, ect.) it didn't work, so this is my newest attempt, creating a dummy mob to hold the vars and saving the mob. It didn't work either. If I could get help on how to do either of these it would be appreciated. (I'll post my original attempt at normal saving if needed) Thanks.