ID:172458
 
proc/save_houses()
var/savefile/S=new("house.dat")
for(var/area/housing/A in world)
S["/[A.name]"]<<A.owner

proc/load_houses()
var/savefile/S=new("house.dat")
for(var/house in S.dir)
for(var/area/housing/A in world)
if(A.name==copytext(house,2,0))
S[house]>>A.owner
break


Is there a reason I cant get that to work? Ive looked over it many times, but I have yet to find the problem, please help.
Metroid wrote:
proc/save_houses()
> var/savefile/S=new("house.dat")
> for(var/area/housing/A in world)
> S["/[A.name]"]<<A.owner
>
> proc/load_houses()
> var/savefile/S=new("house.dat")
> for(var/house in S.dir)
> for(var/area/housing/A in world)
> if(A.name==copytext(house,2,0))
> S[house]>>A.owner
> break

Is there a reason I cant get that to work? Ive looked over it many times, but I have yet to find the problem, please help.

Firstly, why are you trying to save areas? Tell me where you got that awful system first, then I'll try to help you.
In response to Goku72
What do you mean awful system? You mean how by how im saving it? If so, Loduwijk said to use it, otherwise my friend helped me on making a House System with areas, and I need to save those areas.
In response to Goku72
Someone had given him a house saving system which saved areas, but it did not work. He came to me for help. I had initially suggested a system which I thought was better, but he asked if there was a way to keep the area saving system. I gave that as an example which would be a better way to save (indeed, so long as it works it is better than the non-working version).

My initial version I gave him used objects of type /obj/house which would have been placed at the entry points to his houses, but he allready had his entire area version set up and wanted something that didn't need to have hours spent on.

(edit)
Oh and as for the problem. That was just an example, as are more of the things I send. I'll have to get with you on that again if you need help catoring it to your code.