var/list/objs = list ()
obj
var/lastx
var/lasty
var/lastz
area
var/lastx
var/lasty
var/lastz
world/New() // Obj one, DOES WORK
..()
if(fexists("Map.sav"))
var/savefile/F = new ("Map.sav")
F >> objs
for(var/obj/o in objs)
o.loc = locate(o.lastx, o.lasty, o.lastz)
objs.Cut()
return ..()
world/Del()
var/savefile/F = new("Map.sav")
for(var/obj/o in world.contents)
o.lastx = o.x
o.lasty = o.y
o.lastz = o.z
objs.Add(o)
F << objs
return ..()
var/list/areas = list () // Area One, DOES NOT WORK
world/New()
..()
if(fexists("Housing.sav"))
var/savefile/E = new ("Housing.sav")
E >> areas
for(var/area/y in areas)
y.loc = locate(y.lastx, y.lasty, y.lastz)
areas.Cut()
return ..()
world/Del()
var/savefile/E = new("Housing.sav")
for(var/area/y in world.contents)
y.lastx = y.x
y.lasty = y.y
y.lastz = y.z
areas.Add(y)
E << areas
return ..()
Very simple, its the same thing as before, just using areas. Now heres the problem, the obj one works, and the area one doesnt. Dunno why, it just doesnt, and I dont see any difference except for the fact that one works for objs, and the other works for areas. (except for a couple var changes) if possible please, anyone help, and if this wont work, please tell me how to get it to work, thanks.
Oh yea, heres the error I get when I compile:
house.dm:237:error:y.loc:cannot change constant value
As far as i know, a mobs loc is a turf, and a turfs loc is an area. And i dont even want to know what an area's loc is. But have you tried setting the areas x,y,z variables individually, instead of using locate?