Question about register_plugin
Hello friends,
I want to know what is different about these codes and also which one is the best I should use. Thanks for helping. 1st PHP Code:
PHP Code:
PHP Code:
|
Re: Question about register_plugin
Short version: doesn't matter.
|
Re: Question about register_plugin
Quote:
|
Re: Question about register_plugin
2nd and 3rd version use more lines, that's the difference.
|
Re: Question about register_plugin
Quote:
For example; create_entity("info_target"); and entity classname Why people use this code? PHP Code:
|
Re: Question about register_plugin
Code:
new const String[] = "string";Code:
function("string");About #define, it will replace everything with ur value and compiles code Code:
#define A "string"Code:
function("string"); |
Re: Question about register_plugin
Quote:
|
Re: Question about register_plugin
I know they do same things but must be different. I heard that we should use new const instead of define because of server cache. I have to know lots of information about these, I guess.
I am not worry about that. I just wondered. I am worry about entity classname problem because of I don't know which one is the best to use. |
Re: Question about register_plugin
new const means initialize variables that will never be changed, this mean, keep with a permanent value, then, let's suppose you will create 40 entities with classname info_target. To not occupy much memory I believe it would be best to create a variable with the string info_target instead of define each one.
Code:
Code:
something() |
Re: Question about register_plugin
So, for this?
PHP Code:
|
| All times are GMT -4. The time now is 12:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.