Defines vs Cvars
Got a quick question for you folks..
Is it faster and more efficient to use Defines or pcvars? Pcvar Examples: PHP Code:
PHP Code:
|
Re: Defines vs Cvars
cvar - can you change when you want (Not to change plugin .sma)
define - you want to change the value you need to modify directly from plugin (.sma) |
Re: Defines vs Cvars
#define is faster since the value is replaced at the compilation.
But the question is wrong. You need to use cvar because you want to offer an easy way to customize some aspect of your plugin, not because it's faster/slower than x things. |
Re: Defines vs Cvars
Quote:
Thanks for the quick replies. Quote:
I know that.... I was asking which is better for the usage of a plugin meaining which is more efficient. it is a large plugin i am working and want to to be efficient |
Re: Defines vs Cvars
That's not because you use pcvar your plugin will be less "efficient". It's not an optimisation to use #define; the difference would be extremely trivial. It's matter if you want to offer an easy way to change a value or not. You should start to optimize where the gain is really effective.
|
Re: Defines vs Cvars
Quote:
Just working on the conor method of healing... haha.. so far no good. |
Re: Defines vs Cvars
Quote:
- Can you change the value per map ? No. - Can you change the value immediately in game ? No. |
Re: Defines vs Cvars
Quote:
|
Re: Defines vs Cvars
So, use the way you find the more convenient for you.
|
| All times are GMT -4. The time now is 04:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.