ID:973639
 
Code:
Save()
var/FileName="players/Global.sav"
if(!fexists(FileName))
return
var/savefile/F=new(FileName)
var/list1 = list()
for(var/obj/WarObjs/NpcWeakIcon/O in world)
list1 += O;
F["NpcFracoIcon"] << list1
Load()
var/FileName="players/Global.sav"
var/cont = 0
if(fexists(FileName))
var/savefile/F=new(FileName)
F["NpcFracoIcon"] >> list1
for(var/obj/WarObjs/NpcWeakIcon/M in list1)
cont++
new /obj/WarObjs/NpcWeakIcon(locate(M.x, M.y, M.z))


Problem description:

the save is ok, i think..

but when i use load dosn't work.. in the save is saved 1 Obj but in the load the cont var keep 0, i don't know why..

sorry about the bad english kkkk
I don't think that x,y, and z are saved in savefiles. You would have to make a variable to save the x,y, and z.
but don't even enter in the for.. the count keeps 0

i think the error is on save and load.. i already have vars for x,y,z
i made..

for(var/obj/WarObjs/NpcWeakIcon/O in world)
list1 += locate(O.x,O.y,O.z);

--
        for(var/M in list1)
new /obj/WarObjs/NpcWeakIcon(locate(M))



works.. thx