ID:161265
 
Heres what i have...
var/mob/M
for(var/vars/V in M.vars)
usr.vars += V

but it gives me n error
--The M variable is null. There isn't any object reference in it, so you'll get a runtime error if you attempt to access a variable or procedure of it.

--There is no such type path as "vars", so you can't define a variable as "var/vars/V". Besides, variables obviously aren't objects, so they don't have a type, either. Also, no list contains variables, they contain values, anyway... the vars list contains variable names, and nothing else, so you don't need to filter the contents of it when looping. That means, you just use "for(var/V in vars)" - there isn't even any other way.

--The vars list is read-only. You cannot add or remove entries from it (so you can't add or remove variables from objects at runtime, either). You can only attempt to change the value of the associated values of the list's items, in effect changing the value of that variable itself of the object. Your code still wouldn't function properly even if you could do this, though.