How to compare two integer values in if condition.

I'mnoob

Member
Hi, I've created a int variable that makes random number.

And I tried to use if it if condition to compare values like this:
{lv=random number}>{lv=random number}/2

But it failed.
can anyone show me the correct way please.
 

Attachments

  • Screenshot_20231107-140724-412.png
    Screenshot_20231107-140724-412.png
    110.9 KB · Views: 7
  • Screenshot_20231107-140703-527.png
    Screenshot_20231107-140703-527.png
    67.2 KB · Views: 7

Dm114

Well-known member
Hi, I've created a int variable that makes random number.

And I tried to use if it if condition to compare values like this:
{lv=random number}>{lv=random number}/2

But it failed.
can anyone show me the correct way please.
You cannot compare a variable to itself: it's always EQUAL to itself! 😉

You must create a 2nd variable and compare the CURRENT one with the PREVIOUS one.
 

hsurB

Well-known member
It works for me.
Probably as @Endercraft already started mentioning it requires one of the newest versions that has expressions enabled in compare value constraint.
(or the type of variable is messed somewhere)
 

I'mnoob

Member
It works for me.
Probably as @Endercraft already started mentioning it requires one of the newest versions that has expressions enabled in compare value constraint.
(or the type of variable is messed somewhere)
How do u enable it? macrodroid had a update on 4th octo If I'm right and also it doesn't show update option on Play Store so I assume it's up to date.
 

hsurB

Well-known member
You either have to join betatests on play store or download from forum.


I am runing 5.38.8 downloaded from playstore but I am subscribed to beta tests
 
Top