How can I redo this statement in Lolicode?

I need to redo this code in Lolicode:

IF “SOURCE>” DoesNotContain “postal_code”
SET STATUS FAIL
ENDIF
IF “SOURCE>” Contains “postal_code”

I tried this but it doesnt seem to work out:

IF @data.SOURCE DoesNotContain “postal_code”
SET STATUS FAIL
ELSE IF @data.SOURCE Contains “postal_code”

Hi bro,
Here the working code:

IF STRINGKEY @data.SOURCE Contains "postal_code"
@data.STATUS = "SUCCESS";
ELSE
@data.STATUS = "FAILURE";
END
1 Like

It’s actually this

IF STRINGKEY @data.SOURCE Contains "postal_code"
data.STATUS = "SUCCESS";
ELSE
data.STATUS = "FAIL";
return;
END

otherwise it keeps executing what’s after without returning in case of FAIL.
Also it’s FAIL not FAILURE.

3 Likes