Using Switch in a If if condition

It stops the other part of the code from working...