- A way to copy a reference to an earlier scope onto the scope stack.
Using PREV = {} and their ilk moves the stack pointer back, which means you can't refer to a scope you put on the stack later. So the following doesn't work for generating a unique identifier:
Substituting ROOT={ for PREV={ would work here, but I don't always want to do it for the target of the decision.Code:ROOT = { any_title = { limit = { check_variable = { which = title_id which = PREV } } PREV = { set_variable = { which = title_id which = PREV } } } change_variable = { which = title_id value = 1 } }
I've ended up doing the following, which is far from ideal, as it makes setting the ID polynomial on the number of titles:
Code:ROOT = { any_title = { limit = { check_variable = { which = title_id which = PREV } } any_title = { limit = { title = PREVPREV } set_variable = { which = title_id which = PREV } } } change_variable = { which = title_id value = 1 } }
Can't you use PREVPREV to compensate for the fact PREV is a scope change ?
Code:
PREV = { set_variable = { which = title_id which = PREVPREV } }