I’m just starting to use memory blocks to store data persistently to files, and while I doubt any of the follow is possible (at least from what I know of ZScript), I thought I’d ask…
First, is there any safe way of saving mem block data in an actual .ZBR document, and then reloading it when that doc is opened? (Assuming the appropriate script is loaded, of course.)
Next, is there any way of creating/setting a variable from a name held in another variable? For example,
[VarDef, x, “foo”]
Now I want to create a variable “foo”, using only code references to x. This would permit writing of a couple of routines which would make saving and restoring large amounts of data (from many variables) to a single memory block very easy.
Finally, are there any other tips or best practices people might want to offer on this subject?
Thanks,
Ken