Raised This Month: $ Target: $400
 0% 

Nade Semiclip v2.7


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-08-2021 , 04:29   Re: Nade Semiclip v2.5
Reply With Quote #31

Quote:
Originally Posted by JusTGo View Post
If a reviewer asks for it then I will do it, even though I think it's fine to use it this way as I'm using these numbers only once, also in amx1.9+ there are new natives that use game data files that could be used to avoid using the numbers in the plugin but some people might be still using amx1.8.2 and it's still the official stable release.
It's absolutely NOT fine. It doesn't matter that you are using it only once. Quick, without googling anything tell me what this line does:

PHP Code:
get_pdata_cbase(id3735
You can't, even tho I used it only once. What in the world is 373? What is this supposed to do? You don't know unless you just so happen to know that offset 373 is m_pActiveItem. Now, look at the following line:

PHP Code:
get_pdata_cbase(idm_pActiveItemXO_PLAYER
You know instantly what it does. A number doesn't say anything, but a name does.

Not having magic values in your plugin is a requirement for approval, for a very good reason. Doing otherwise is asking for unmaintainable, unreadable and crappy code.
Use 1.8.2, it's fine, in fact it's even recommended if it can be reasonably done as it is still the latest stable release. Just name things properly, it's not hard.
__________________

Last edited by HamletEagle; 11-08-2021 at 04:31.
HamletEagle is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:33.


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