Using Switch in a If if condition

there is nothing in that code that suggests it would stop other code from working, the problem must be in the part of the code you won’t show