Is it possible to keep going forward after a TRY/CATCH FAILURE STATUS?

Hello @Ruri and everyone, hope you’re doing well.
So for the title question I want to know when using TRY/CATCH and the bot ends with FAILURE STATUS is it possible that I use an IF STATEMENT to give it another link to check if it works? if yes how am I suppose to write the IF STATEMENT FOR that?

I’m not sure I understood the question very well. Can you make an example with some pseudocode? Thanks

you can read the documentation in “/docs/lolicode/statements”

It’s like this but I need it in the correct way (Just an example of what I wrote above in the topic).

TRY
BLOCK:HttpRequest
LABEL:example111222
  url = "https://example222111.com"
  TYPE:STANDARD
  $""
  "application/x-www-form-urlencoded"
ENDBLOCK
CATCH
data.STATUS = "FAIL";
return;
END

IF @data.STATUS "Contains" "FAIL"
BLOCK:HttpRequest
LABEL:example111222333
  url = "https://example222111.com"
  TYPE:STANDARD
  $""
  "application/x-www-form-urlencoded"
ENDBLOCK
END

If the config found a FAIL STATUS it has to keep running and check another link after the first one that’s exactly what I want to apply using the IF STATEMENT if possible.

No you cannot take another line from the data pool / wordlist without actually finishing the script. Why not just let it run the script one more time with the new line? That’s what the MultiRunJob does. I don’t see the problem here.

What I mean is when the TRY/CATCH find the URL of a Website does not exist in the web it gave you FAIL STATUS directly and stops the bot from continuing, what I want it to do is to check another link with TRY/CATCH as well but not to stop after the first TRY/CATCH, I hope you got my point.

Exactly one time with new line how to do that?

Well then just remove the return; statement. Return basically means end everything and don’t proceed

1 Like

Worked perfectly! what about the BOT STATUS when it ends with FAIL how to keep going?
image
Do I have to use it from the config settings or there is a STATEMENT for it?

Or for SUCCESS STATUS when the config find a SUCCESS KEY it has to stop but not using the config settings. I tried this and got the RESPONSECODE error!
image

It’s supposed to be data.RESPONSECODE and it’s supposed to be an int key, should still work with string key though

1 Like

I just want it to stop when it finds a SUCCESS KEY for specific requests not for all of them.

Yes I get it, but you wrote RESPONSECODE instead of data.RESPONSECODE

Yeah I fixed that one, and now I’m not sure what to do to make the config stop when it finds a SUCCESS KEY for specific requests not all of them.

Have you tried using return; ?

I’m using it in the TRY/CATCH
image
Not sure how to repeat it with a SUCCESS STATUS so it allows the config complete the process!

You can put your return; right after the data.STATUS = "SUCCESS";
Or you could set SUCCESS status as a condition the bot will stop, in Configs > Settings

image

1 Like

Appreciate you help, actually I already tried the settings but this one is dedicated to stop the config for any SUCCESS KEY it finds, in my case I only want the config to stop for specific requests or let me say that I don’t want the config to stop after the first request when it finds a SUCCESS KEY but it has to stop for all of the upcoming requests when it finds a SUCCESS KEY in one of them that’s my point.

Use return; then, if you have multiple SUCCESS keys, you could just put it in the one which you want the bot stop.

So I just type return; in LoliCode beneath the KEYCHEK BLOCK?