Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I run this passage at the start, to initialize the memory object's variables (so there's default values if there's nothing stored in Local Storage, and attempt to load the memory object from Local Storage, overwriting the defaults.
- <<set $memory to {
- name: "Default",
- madeImportantChoice: false
- }>>
- <<set $memory to setup.loadMemory()>>
- <<if ndef $memory>>
- <<set $memory to {
- name: "",
- madeImportantChoice: false
- }>>
- <<run setup.saveMemory()>>
- <</if>>
- <<if $memory is null>>
- <<set $memory to {
- name: "",
- madeImportantChoice: false
- }>>
- <<run setup.saveMemory()>>
- <</if>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement