proc
SaveHouses()
var/savefile/S=new("houses")
var/area/housing/A
for(var/area in typesof(/area/housing)-list(/area/housing))
A=locate(area)
S["/[A.name]"]<<A.owner
S["/[A.name]/welcomemsg"]<<A.welcomemsg
S["/[A.name]/goodbyemsg"]<<A.goodbyemsg
S["/[A.name]/invited"]<<A.invited
LoadHouses()
var/savefile/S=new("houses")
var/area/housing/A
for(var/area in typesof(/area/housing)-list(/area/housing))
A=locate(area)
S["/[A.name]"]>>A.owner
S["/[A.name]/welcomemsg"]>>A.welcomemsg
S["/[A.name]/goodbyemsg"]>>A.goodbyemsg
S["/[A.name]/invited"]>>A.invited
SaveObjs()
var/list/objects=list()
var/savefile/S=new("objects")
for(var/obj/O in world)
if(isturf(O.loc))
objects+=O
objects[O]=list(O.x,O.y,O.z)
S<<objects
LoadObjs()
var/list/objects
var/savefile/S=new("objects")
S>>objects
var/list/L
for(var/obj/O in objects)
L=objects[O]
O.loc=locate(L[1],L[2],L[3])
I've currently deactivated this code, so it shouldnt crash in my game anymore, so the problem is neutralized, but this is the only code that could possibly cause problems, ONLY when the world is rebooting, or shutting down. Please help, The save versions are the only things called in world/Del()
It won't crash any less often in 339 than 340. The two versions are practically identical.
I see two problems involving list husbandry.
First: When subtracting from typesof() you do not need list() around the thing you subtract. typesof(/area/housing)-/area/housing is just as effective as typesof(/area/housing)-list(/area/housing), but quicker because it doesn't create a list temporarily. (Of course, this loop is doomed to failure anyway, since it's going by type and not by actual areas. Clearly you can't hardcode a type path for everyone in your game, so this loop should only find and save a single house of each type. You should simply loop through var/area/housing/A (all the ones in the world) instead.
Second: Your object saving is tossing about a zillion lists into the savefile that it doesn't need. Consider what DM is going to do when it tries to load that. Better to simply modify obj/Read() and obj/Write() to save the position info you want, and restore its position on load.
Lummox JR