help with switch,case
Hi guys.
I am working on something that needs a switch, but when i compile it gives expression has no effect. so i hope someone can explain a bit about switch and cases. this is the part i have trouble with. There are 5 ranks and the menu the player gets depends on his rank. The ranks 2-5 are commented because they are'nt ready yet. And check_user(id) is a stock that checks if user is connected to avoid runtime errors PHP Code:
|
Re: help with switch,case
PHP Code:
|
Re: help with switch,case
Also, return PLUGIN_HANDLED cannot be in the switch statement (unless it's in a case). Only cases can be in the switch statment.
If you don't use "rank" more than once then totally skip making that variable. |
Re: help with switch,case
ok, i fixed it.
Can i ask another question to? How can i use something that return a random number, and do something when the number equals a other number. I tryed this but i don't think it works PHP Code:
|
Re: help with switch,case
That would work.
PHP Code:
|
Re: help with switch,case
Oke, thx guys for the fast reply's
|
| All times are GMT -4. The time now is 08:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.