Need Some help with python

I’m very new at this and dont know much coding but i’m doing my best to learn. If you can please help with this.
Can this be done in python or OB2. I tried something by searching the forums and looking around but im doing something wrong.

    BLOCK:Script
INTERPRETER:IronPython
INPUT @rs,@jk,@dg
BEGIN SCRIPT
if @rs > 20 and @jk > 12 and @dg > 30:
@dam = "yes"
else
@dam = "no"
END SCRIPT
OUTPUT String @dam
ENDBLOCK

I’m trying to convert something from OB1 to OB2 this is what i had working in OB1

#Dam Check
IF "<rs>" GreaterThan "20"
IF "<jk>" GreaterThan "12"
IF "<dg>" GreaterThan "30"
SET CAP "Dam" "Yes"
ELSE
SET CAP "Dam" "No"
ENDIF

You need to use indentation in python. Use latest OB2 version as the old versions removed indentation.

Otherwise in LoliCode you can do this

string Dam = "";
data.MarkForCapture(nameof(Dam));

IF INTKEY @rs GreaterThan 20
IF INTKEY @jk GreaterThan 12
IF INTKEY @dg GreaterThan 30
Dam = "Yes";
ELSE
Dam = "No";
END

In version 0.1.11 you will also be able to use this syntax which I just added

SET VAR Dam ""

IF INTKEY @rs GreaterThan 20
IF INTKEY @jk GreaterThan 12
IF INTKEY @dg GreaterThan 30
SET CAP Dam "Yes"
ELSE
SET CAP Dam "No"
END
1 Like