[HELP] Convert if to switch in this code
How do i convert if to switch statement?
PHP Code:
|
Re: [HELP] Convert if to switch in this code
|
Re: [HELP] Convert if to switch in this code
I'm astonished because of your take over of making a xp(stuffnthings) plugin without knowing the usage of switch. It also isn't used only on Pawn, but mostly on all programming languages.
|
Re: [HELP] Convert if to switch in this code
You mean this?
PHP Code:
|
Re: [HELP] Convert if to switch in this code
Code:
|
Re: [HELP] Convert if to switch in this code
Use arrays or create some sort of formula to calculate the level. I can see the pattern - each 3 levels score against higher ranks (with some exceptions).
|
Re: [HELP] Convert if to switch in this code
This uses enums to organize everything. You can set the rank ranges and display names in the rdRanks array.
PHP Code:
|
Re: [HELP] Convert if to switch in this code
Quote:
|
All times are GMT -4. The time now is 00:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.