Less than / Greater than (Parse) Keycheck Block

Less than / Greater than (Parse) Keycheck Block

I have my parse (string) REWARDS

For next block it’s Keycheck and CUSTOM.
I want everything that’s below 50 to go to free but not sure which to use Int or FLOAT
And I tried this but does not work.

It still gives success on a $15 account.

How it looks right now in Loli

BLOCK:Parse
LABEL:REWARDS
  input = @data.SOURCE
  leftDelim = "loyaltyRewards\":[{\"amount\":"
  rightDelim = ","
  jToken = ".loyaltyRewards"
  MODE:LR
  => CAP @REWARDS
ENDBLOCK

BLOCK:Keycheck
  KEYCHAIN CUSTOM AND
    STRINGKEY @data.SOURCE Contains "loyaltyRewards\":[]"
    STRINGKEY @data.SOURCE Contains "totalAvailableRewards\":0"
    INTKEY @REWARDS EqualTo 50
ENDBLOCK

I may be wrong but pretty sure you would need to convert the string to a int

Just create a new constant integer varible and set it as the capture.

C# doesnt play well mixing Strings and Integers so best to convert it outright

Why are you using EqualTo if you want to use LessThan and GreaterThan instead? I don’t understand…

is it something like this


if ( @ REWARDS >= "50")
{
data.STATUS = "CUSTOM";
}

That will definitely not work @beyto you’re using >= with a string

Yes that is right @Ruri

This worked for me before on string value.

if ( @price == " " || @price == $"0{currency}")
{
data.STATUS = "CUSTOM";
}

but this doesn’t work >=

It’s better if he sticks to using the keycheck block as it was built especially for this exact purpose

1 Like

it was 3am when i posted this but yes i was trying to use Less than 50

What’s a sample value of the variable called REWARDS?

BLOCK:Parse
LABEL:REWARDS
input = @data.SOURCE
leftDelim = “loyaltyRewards”:[{“amount”:"
rightDelim = “,”
jToken = “.loyaltyRewards”
MODE:LR
=> CAP @REWARDS
ENDBLOCK

BLOCK:Keycheck
banIfNoMatch = False
KEYCHAIN CUSTOM AND
STRINGKEY @data.SOURCE Contains “loyaltyRewards”:"
STRINGKEY @data.SOURCE Contains “totalAvailableRewards”:0"
INTKEY @REWARDS LessThan 50
ENDBLOCK

Tried this and still get success when it should be custom

@bestlifeoncod

I think your answer is here

ya no clue what that even means but ok.

I think it’s telling you to write the content you get from here

loyaltyRewards":[{"amount":"**what exactly is written here**,

no worries ill just do it manually and check on ob2 then recheck the hits on ob. Because the Int and Float shit is giving me a headache.

It would be really easier to help you if you screenshot your PARSE and KEY CHECK block in stacker.

And add an example of what you are tryna capture please.
Ex: totalreward:“57”,
I want to capture 57