Cut to the chase I have recreated my problem as it is fairly self explanatory.
this complies without error:
switch (n) { case 1
You can't declare a variable as the first statement in a case without brackets, and in many other contexts in C-based languages. See Declaring variables inside a switch statement for details.
case