ID:144990
 
Code:
mob/proc
Save()
saved=1
var/savefile/F=new(ckey)
SaveOverlays(usr)
Write(F)
Load()
var/savefile/F=new(ckey)
Read(F)
SaveOverlays(var/mob/M)
var/icon/I
for(I in M.overlays)
M.overs.Add(I)
M.overlays.Remove(I)
RestoreOvers()
var/icon/I
for(I in src.overs)
src.overlays.Add(I)
src.overs.Remove(I)
mob/var/list/overs=new/list()


Problem description:

The overlay still merges with the icon when saved...please help
Your for()s aren't working correctly.
Just loop through everything in the lists.

for(var/I in M.overlays)
//and
for(var/I in M.overs)


and don't forget to add your RestoreOvers() to your load proc unless you don't want it there ;).

Load()
var/savefile/F=new(ckey)
Read(F)
RestoreOvers()//after reading the file of course.
In response to Vermolius
did what you said and still no luck :(
In response to Shlaklava
Bump Srry if not allowed
In response to Shlaklava
There're demos on this, and very simple systems they are too.

mob
var/list/Overlays=list() // Mind the capitalized "O"
proc/update()
src.overlays=null // Reset his overlays completely.
for(var/i in Overlays) src.overlays+=i
// For everything in Overlays (referred to as i), add it to overlays.

// Now, when adding/removing overlays..

mob/verb/Add_Overlay()
usr.Overlays+=/obj/overlay
usr.update()

mob/verb/Remove_Overlay()
usr.Overlays-=/obj/overlay
usr.update()