Page 1 of 1

[Solved] What is the correct way to change the value of a local screen variable?

Posted: Thu Jul 29, 2021 5:53 am
by henvu50
EDIT: I don't think we're ever supposed to set a value like that in a screen. Alter your logic to something else.

What is the correct way to change the value of a local screen variable? There is no example of this in the documentation.

Code: Select all

screen test50():
    default localScreenVariable = 123
   
   # WHICH ONE?!  Why can't this basic info be in the documentation? 
    SetScreenVariable(localScreenVariable, 456)   
    $ SetScreenVariable(localScreenVariable, 456) 
    $ localScreenVariable = 456                   
    invoke Action SetScreenVariable(localScreenVariable, 456)