Raised This Month: $12 Target: $400
 3% 

nVault Tutorial


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 09-23-2016 , 13:55   Re: nVault Tutorial
Reply With Quote #11

Quote:
Originally Posted by KliPPy View Post
Readability and maintainability. Just by sizing an array with MAX_PLAYERS + 1 (MAX_PLAYERS is 32, so +1 makes it 33), it gets self-documented, saying that array is intended for player data.

Always use named constants instead of "magic" numbers if possible, they make the code better.

ok, so why not like that:

PHP Code:
const MAX_PLAYERS 33;
new 
szAuthIdMAX_PLAYERS ]; 
I suppose it's ok for readabilty ...
???
__________________
Project: Among Us

Last edited by Craxor; 09-23-2016 at 13:55.
Craxor is offline
Send a message via ICQ to Craxor
 


Thread Tools
Display Modes

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 08:50.


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