This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
codex [2024/10/20 21:35] – justin | codex [2025/03/11 17:18] (current) – justin | ||
---|---|---|---|
Line 15: | Line 15: | ||
display_message(" | display_message(" | ||
</ | </ | ||
- | The script above creates a codex variable containing lookups for an item ID and a numeric count value, then displays the count in a message | + | The script above creates a codex variable containing lookups for an item ID and a numeric count value, then displays the count (converted to a [[string]] value) |
====Modifying a Value:==== | ====Modifying a Value:==== | ||
Line 30: | Line 30: | ||
</ | </ | ||
The script above creates an empty codex variable, then inserts a new key/value pair with a key of " | The script above creates an empty codex variable, then inserts a new key/value pair with a key of " | ||
+ | |||
+ | ====Iterating All Keys:==== | ||
+ | <code bauxite> | ||
+ | $my_codex = codex[" | ||
+ | for $key in $my_codex do | ||
+ | | ||
+ | end; | ||
+ | </ | ||
+ | The script above displays each key of the codex along with its corresponding value. The " | ||
~~NOTOC~~ | ~~NOTOC~~ |