Hi,everyone Im trying to input a string and make it output a number with “if else” function, for example I have two variables Top and Bottom with two control strings(note:only two), H_G and V_G If I input H_G It will give a top length 13 and bottom length 11, and if I input V_G, it will give a Top length 10 and Bottom length 8.
I’ve tried but It doesn’t seems to work, any suggestions?
As @JacobSmall said, the && is part of your problem. When you use a variable name without any operator/logic, it is basically asking if that variable is true or not a null. The && means And, in other words, both Top and H_G is true.
So in your example, you used H_G as a variable in the first code block, but not filled in. If you check, it is a null. And Top is also not filled in and is a null. Thus both Top and H_G are nulls, so the answer is false. This is the same for all of your IF statements.