Jump to content
  • 0

Help me with using if value between 2 number


KarimIdris999997

Question

Posted
if V[1].value == 1~10 then
 --do something

Question.

Why the command above is not working,i know i can use like this 

if H[1].Value <= 10 then
  --do something

and it work just fine.I've tested it.

Let brings another example.I want to use number between 500 and 1000 so it should be 500~1000 by normal.So how to use it in the command like above? Can anyone help me with the suitable command ,Thank You.

@MonkeySAN

1 answer to this question

Recommended Posts

Posted

There are logical operators "and" and "or" that can be used to combine conditions. Here is how you can check if number is in certain range: 

if num >= 500 and num <= 1000 then -- ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.