If Sw are boolean arrays then should it not be
if ( (Sw[6]==true) || (Sw[0] ==true) ||(TF == 2) ) {return;}
Yes I know you can shorten this to:-
if ( (Sw[6]) || (Sw[0]) ||(TF == 2) ) {return;}
What the OP needs to do is to print out the variable values before the if, and he will find that the statement is doing what it should do.