ID:1794505
 
(See the best response by Kaiochao.)
Code:
    proc/SaveVars(Unit/L)
var/list/Saved=list()
for(var/stat/S in L.vars)
Saved+=S
spawn(30) world<<"list: [Saved]"


Problem description:
Is there a way to store a list of variables? If not, I just want to save the names of the variables.
Best response
Maybe vars.Copy()?
mob/verb/dump()
var/V
for(V in vars)
usr << "[V] = [vars[V]]"


Source: The marvelous power of ctrl+f

What I believe you are doing wrong is you are adding the variable and not the text of it. Wrap it in quotations.