THE FORUM IS IN READ-ONLY MODE
Recursive variable loop
-
Re: How to loop on a LIST variable
Hello Ruri, I'm working on something and my Loliscript knowledge isn't that good especially with lists,
Let's say we've a recursive variable called <Var> and has computed 2 items, [L1, L2], and I want to make a loop to change the URL if the first L1 gave a bad key for example
www.example.com/<Var>/
It'll compute L1 but then I got a bad key, But I want to change the URL to compute L2 instead, Is it possible with WHILE condition?
I've tried Compute function but I couldn't make it to work
Tried WHILE condition with JUMP but to no avail
Thanks in advance.
-
IF "<VAR[0]>" Contains "you bad"
JUMP #GET2
ENDIF
F "<VAR[0]>" Contains "you good"
SET STATUS SUCCESS
ENDIF
#GET2 URL, POST DATA...
IF "<VAR[1]>" Contains "you good"
SET STATUS SUCCESS
ENDIF
IF "<VAR[1]>" Contains "bad"
SET STATUS FAIL
ENDIF
-
Next time post in https://forum.openbullet.dev/category/4/questions please. This is not a guide.
If your variable always hold two values then you can do it with the if statements. If it can have more than that then a while loop with if statements would be better