Bryce: Scopes in m&b are somewhat looser defined than that. You could think of the scope as the outmost block of code containing the statement. That sentence is a bit vague, I realize; in practice each script consists of one block. Any local variable referenced in a script is defined for all portions of that script, regardless of try-blocks.
For trigger the conditions are one scope, and the "body" is another separate scope. The same principle holds for dialogs, etc.
Morgoth: String registers have two uses, and two uses only:
1) You can put values in them using the various str_store_xxx commands (which you can find in header_operations.py); and you can clear them using the str_clear command.
2) They can be referenced in strings displayed using the display_message command, using the notation
{s#} where '#' is the number of the string-register.
For instance, if you have an entry in your module_strings.py file that looks like this:
Code:
("lets_meet_in", "Let's meet in {s10}."),
and a script with the following code:
Code:
(str_store_party_name, 10, "p_zendar"),
(display_message,"str_lets_meet_in"),
then that piece of code will display the message
when it's executed.
The {s10} part in the string-entry means "put the current contents of string-register 10 here", while the (str_store_party_name, 10, "p_zendar") part means "store the name of the party
p_zendar in string-register 10".