Does anyone know how to make a synonym, a shortcut reference, for a variable? For example, I have a list called “Traits of player” and each entry is a value. It is inconvenient to say “entry 3 of Traits of player” over and over, especially for each of the entries, which are unique. I would prefer to say: for example, “increment STR” where STR(ength) is entry 3 of Traits of player, or WIS(dom) is entry 6 of Trait of player.
I know that I can say Understand "STR" as entry 3 of Traits of player.
but that only sets up what the parser understands, and not the code. Understand phrases don’t work there.
Phil’s solution is the best one in general. It’s possible to actually make two variables be aliases of each other, using a bit of I6, but this usually isn’t a good idea.
[code]
To decide on STR:
Decide on entry 5 of Traits of player;
[\code]
I get this compile error " You wrote ‘Decide on entry 5 of Traits of player’ as the outcome of a phrase, a number, but in the definition of something which was not a phrase to decide a value.
(Not sure where the tab sent in the Decide phrase. It is in there in my code but doesnt makeit to the post.)