THE FORUM IS IN READ-ONLY MODE

This forum is in read-only mode. The new forum is live at https://discourse.openbullet.dev and registrations are open!

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"
    PRINT "CUSTOM - OK"
    ENDIF
    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"
    ENDIF
    IF "<result>" EqualTo "2"
    #test UTILITY File "test.txt" AppendLines "Good Success - 2"
    ENDIF
    ENDIF

    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