switch + case question

admin

Administrator
Staff member
Hello,
i have the following code:
function xroma (varibel1, varible2,varible3,farbe){
switch (farbe)
{
case 1:
mycolor = #000000;
break;
case 2:
mycolor = #ffffff;
break;
case 3
mycolor = #cccccc;
break;
}
paint([...],mycolor);
}
i get an error : expected label for break.
I am just getting started with javascript so if antbody could help and tell me what i am doing wrong here, this would be nice.
Thanks
 
Back
Top