binary input from analog potentiometer?

I'm wondering if the problem is having more than one input as variables inside the last "nested if" statement? But I'm not sure the correct syntax for how to separate those.