AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   switch case (https://forums.alliedmods.net/showthread.php?t=245455)

quark 08-02-2014 08:00

switch case
 
hey guys, im not home, im writting from my mobile , im wondering if this is possible:
PHP Code:

switch(something) {
case 
1random;
case >
1other function;


Or should i use if statements?

Thank you for helping the spam addicted

YamiKaitou 08-02-2014 08:24

Re: switch case
 
You must use an if statement

quark 08-02-2014 12:07

Re: switch case
 
well that sucks, thanks

Flick3rR 08-02-2014 12:49

Re: switch case
 
Or you can use 'default' as an "else" statement in switches. I mean, if the case is not 1, the default is: //Do something.

quark 08-11-2014 19:39

Re: switch case
 
hm, i will try thank you


All times are GMT -4. The time now is 12:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.