If Else

IF STRINGKEY CONTAINS “LOVE”
JUMP #LOVE
END

But I wanna stringkey contains LOVE or LIKE Or OK all it jump to #LOVE
How to make that in OB2

Thank you for advice.

IF STRINGKEY @yourvariable Contains "Love"
JUMP #LOVE
END

// Other blocks only if jump did not trigger

#LOVE

// Other blocks to run in both cases

I mean like that:
IF STRINGKEY @yourvariable Contains “Love”
STRINGKEY @yourvariable Contains “Like”
STRINGKEY @yourvariable Contains “OK”
JUMP #LOVE
END

How can I make above code as rigtway

Using LoliCode

IF STRINGKEY @yourvariable Contains "Love"
IF STRINGKEY @yourvariable Contains "Like"
IF STRINGKEY @yourvariable Contains "OK"
JUMP #LOVE
END
END
END

Using C#

if (yourvariable.Contains("Love") && yourvariable.Contains("Like") && yourvariable.Contains("OK")
{
JUMP #LOVE
}

If you want OR instead of AND just replace && with ||.

Value Love But It still JUmp #HATE and #LOVE all Bro

BLOCK:ConstantString
value = “Love”
=> VAR @constantStringOutput
ENDBLOCK

IF STRINGKEY @constantStringOutput Contains “Love”
IF STRINGKEY @constantStringOutput Contains “Like”
IF STRINGKEY @constantStringOutput Contains “OK”
JUMP #LOVE
END
END
END

#HATE
BLOCK:HttpRequest
url = “https://yahoo.com/?p=us
TYPE:STANDARD
$""
“application/x-www-form-urlencoded”
ENDBLOCK

#LOVE
BLOCK:HttpRequest
url = “https://www.google.com/
TYPE:STANDARD
$""
“application/x-www-form-urlencoded”
ENDBLOCK

That way it checks them in AND fashion. If you want to check in OR fashion you have to use C# as I said above.

1 Like

ITS QUIET HARD TO ME. I try later.
Hi Ruri, I wanna copy first line in txt file to Identifier. Help me out, thank so much.

hey i want use condition
i want set
if Age contains 25
Set status fail how i can do ?
can you send loli code

IF STRINGKEY @Age Contains "25"
data.STATUS = "FAIL";
return;
END

And if i want set var or set cap how i can?
Example if age contains 25
Set cap “valid age” “Yes”

// Put a constant string block here and initialize your variable (empty)
IF STRINGKEY @Age Contains "25"
// Put another constant string block here and assign the value to the variable above
END

Can you send example loli code
Thanks

I just did :eyes: :eyes:

You did the capture using the block. I want to act like version one.
In version 1, we did this
IF “SOURCE” Contains “xx”
SET CAP “VALID_AGE” “YES”
ENDIF

i dont want use block in this Condition
I want use loli code.

There isn’t a lolicode statement to declare variables. You can use C# tho.

string VALID_AGE = "";
data.MarkForCapture(nameof(VALID_AGE));
IF STRINGKEY @data.SOURCE Contains "xx"
VALID_AGE = "YES";
ENDIF

ok thanks bro///////////

Screenshot (297)
What is the problem that I get an error when I start?

Maybe show the error you’re getting

CompilationErrorException

[IDLE] (7,14): error CS1002: ; expected

[IDLE] (7,14): error CS1002: ; expected