I have the following code:
switch self.score
{
case 1:
self.score = self.score - 2
case -10...-10000: // ! Expected expression after unary operator
println("lowest score")
self.score = -10
default:
self.score = self.score - 1
}
I have also tried case -1000...-10:
. Both get the same error ! Expected expression after unary operator
.
What I would really like to do is case <= -10:
, but I can't figure out how to that without getting this error Unary operator cannot be separated from its operand
.
What am I not understanding?