ID:139009
 
Code:
MM.vars=M.vars.Copy()


Problem description:

Clones.dm:75:error: MM.vars: cannot change constant value

I want to set the MM's vars, which is a mob, equal to M's vars, which is also a mob.
I'd go about it in this manner:

for(var/v in o.vars)
m.vars[v] = o.vars[v]
In response to LordAndrew (#1)
Do you know why it gives me this?
runtime error: Cannot read null.icon
proc name: New (/mob/Clone/New)
usr: Clone (/mob/Clone)
src: Clone (/mob/Clone)
call stack:
Clone (/mob/Clone): New(null)
Raimo (/mob/player): Tech(Raimo (/mob/player))
Create Clones (/obj/Skills/Create_Clones): Click("Skills", "window1.info1", "icon-x=59;icon-y=13;left=1")
runtime error: Cannot write to atom.type.
proc name: Tech (/obj/Skills/Create_Clones/proc/Tech)
usr: Raimo (/mob/player)
src: Raimo (/mob/player)
call stack:
Raimo (/mob/player): Tech(Raimo (/mob/player))
Create Clones (/obj/Skills/Create_Clones): Click("Skills", "window1.info1", "icon-x=59;icon-y=13;left=1")

For this code:
                    var/mob/Clone/MM = new()
for(var/v in M.vars)
MM.vars[v] = M.vars[v]
MM.loc = T
spawn(6000)del(MM)

In response to Raimo (#2)
...oh right. Woops, forgot you have to account for certain variables that aren't meant to be modified at runtime.

You need to add after the for(vars) part...

if(issaved(o.vars[v]))