Saving a Map with a Map Inside
- Posted by euphoric (admin) Sep 11, 2011
- 1136 views
I basically have this:
map:map mainMap = map:new() map:map mainMapVars = map:new() -- populate mainMap with some data -- populate mainMapVars with some variables map:put( mainMap, "VARS", mainMapVars ) map:save_map( mainMap, myMapFileName )
which is fine during program execution. HOWEVER, when I go to save it, I need to save the actual map contents, not the pointer to the map.
Then, when I load it back up, I need to put those VARS back into a map of their own.
How do I put the actual map itself, and not the pointer, into mainMap for the save? Or do I need to use another file to save the vars map (yuck!)?