Tips on User Variables

Top  Previous  Next

1. Do not create variables named equally to any other trigger variable. For example, these user variables will be processed incorrectly:

profit_loss, back_price, card_1


You can however create variables with the names part of which is a trigger variable name. Example: myprofit_loss, back_price_one, fistcard_1_s


2. Always initialise user variables with the very first triggers in your trigger block, as the variables that do not have any value are not parsed. The easiest way to do this is to create a trigger that will be executed one time only, in any round starting from the first (because you don't know for sure in what round you will start monitoring the channel). Here's an example:



You can also initialise a variable manually, by entering the corresponding value in the "View Variables" window.


3. If you assign a variable some trigger expression where other user variables are involved, make sure that those variables are initialised as well. Use the trigger condition "User Variable... is set". Example:



4. For controlling the values of your variables use "View Variables" tool.


5. User variables's values stay the same until you change them by applying a trigger whose action is "set user variable". This means their values do not change by any other parameters or events; they are not reset in the beginning of a new game, they do not change if addressed in a different channel, their value does not depend on a game or selection.


6. All user variables are de-initialised (unset) whenever you restart the program or press the "Save Triggers" button.


7. There is no special command for increasing/decreasing the value of a user variable. You can do those operations through the "set user variable" trigger action:



8. If you expect to change the variable and then use it in one or more triggers, then be sure to arrange the triggers in right order. If you put the trigger changing the variable after the trigger that refers to it, then the latter trigger will use the old value of the variable.


9. If the value of the variable does not depend on any conditions, use "User Constants" instead. Constants are a quick way of adding a block of user variables with fixed values.