I want to compare 3 variables to see if they have the same value as a 4th variable. I tried using the "and" operator.
if a and b and c == d then print("correct") end
However, I found out that "and" can only be used between 2 variables. Is there an alternate operator that I can use?
Many thanks.
You have to make sure you compare each variable with d
individually
if a == d and b == d and c == d then print("correct") end
Hope this helps!