switch(decision)
{
case 0: {fire=1}
{
yvelocity =5;
}
break;
}
switch(decision)
{ // <--- only one pair of brackets needed. That's the beauty of switch!
case 0:
fire=1;
yvelocity=5;
break;
// now you're ready for the next case!
case 1:// <<< notice a colon goes here
// put whatever you need to happen when decision == 1 here.
break; // <<< and a semicolon goes here
} // << last bracket.
Users browsing this forum: No registered users and 1 guest