Why, after the CUSTOM condition, it jumps to the SUCCESS condition?

  • During work, I get 2 STATUS values ​​- this is SUCCESS or CUSTOM. I am trying to do a check for each value and execute a specific script.
    I do as follows:
    SET VAR "result" "1"
    IF "<STATUS>" EqualTo "CUSTOM"
    IF "<STATUS>" EqualTo "SUCCESS"
    // Here requests are executed, etc., and I get a certain value of the result variable - 2
    IF "<result>" EqualTo "1"
    #test UTILITY File "test.txt" AppendLines "Good Success - 1"
    IF "<result>" EqualTo "2"
    #test UTILITY File "test.txt" AppendLines "Good Success - 2"

    The problem is that after the CUSTOM condition is met, the script jumps to the SUCCESS condition to check the result variable and tries to execute. Why? how to avoid this?

  • Seems to understand. This is because of the variable at the beginning of the "result" code. Strange LoliScript logic of course. I wanted the variable to be global. I don't know if this is a bug or a feature. Hi Ruri)

  • Another interesting point. If I declare the variable "result" inside the CUSTOM clause, it will still try to fulfill the conditions inside the SUCCESS block

Log in to reply