Syntax Error


#1

I have a syntax error and I have no clue why.


#2

You have a default: but no break;


#3

Technically you don’t even need to put a break in there because it’s the last of the switch cases, but you will need to put something in there to satisfy the compiler. Even a simple ; would do the trick, but if you don’t have anything to execute in the default it might be wise to do what Chris suggested and go with a break statement. It will make your code easier to read.