Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to see if a number through another number, in an if statement? (Answered)

Asked by 4 years ago
Edited 4 years ago

Ok, my question doesn't make a lot of sense, Ill explain it better. So I want to do if number == this number through this number then it does whatever. I tried using - but it just thinks its subtracting. Is there a symbol I can use for this? Because I dont want to do 1 or 2 or 3 or etc... My failing code

if number == 1 - 75 then
            print (number)
        end
0
so basically you want the range of what the number is in 123nabilben123 499 — 4y
0
Yes zandefear4 90 — 4y
0
I want the if statement to see if its a certain number through a certain number zandefear4 90 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Someone showed me I could use greater than or equal to, and less than or equal to. Code:

if number >= 1 and <= 4 then
--code
end
Ad

Answer this question