02.02.2015, 02:49
help with case
02.02.2015, 03:09
You can't use else-statements in a switch. You could however use a default-statement:
pawn Код:
switch(something)
{
case 0: { if something is '0' }
case 1: { if something is '1' }
case 2, 3, 4: { if something is 2, 3 or 4 }
case 5..20: { if something is between 5 and 20 }
default: { this is like an 'else-statement' if no other matches were found }
}
02.02.2015, 03:16
02.02.2015, 04:14
If you use multiple functions in 1 case, you have to put them between brackets { }
Just do it like you did in the first post, but change 'else' to 'default'.
Just do it like you did in the first post, but change 'else' to 'default'.
02.02.2015, 04:29
I did as you said, but I still did not work. I'm running all the choices are not used but not the only one I want.
02.02.2015, 09:53
« Next Oldest | Next Newest »
Users browsing this thread: 3 Guest(s)