How Trigger Expressions Are Parsed
|Top Previous Next|
When X-Feeder starts interpreting an expression that contains more than one trigger variable, it sticks to the following order:
1. User variables
2. General variables
3. Win / lose history variables
4. Game-related variables
5. Variables that explicitly define the selection they are related to.
6. Selection-related variables
Therefore, if you have a compound expression, for example:
last_lost*(h_inplay_num_back_price - 1) + back_matched / myvar
Then this is how it will be parsed (the values of the variables are made up as an example):
1. myvar = 1.8. last_lost*(h_inplay_num_back_price - 1) + back_matched / 1.8
2. last_lost = 12. 12*(h_inplay_num_back_price - 1) + back_matched / 1.8
3. inplay_num = 3. 12*(h_3_back_price - 1) + back_matched / 1.8
4. h_3_back_price = 5.2. 12*(5.2 - 1) + back_matched / 1.8
5. back_matched = 30. 12*(5.2 - 1) + 30 / 1.8
Arithmetic expressions and functions are evaluated after all variables are replaced with their actual values. So the above expression will result to 67.067.
If the program encounters an error in either the name of a variable or function, it will stop parsing the expression and will return an error message that you will be able to see in the trigger log file.