Raised This Month: $ Target: $400
 0% 

Question about player variables


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 07-15-2017 , 17:04   Question about player variables
Reply With Quote #1

Why does every single plugin ( including mine until I got awareness ) uses new Variable[33] instead of Variable[32] and use Variable[0] as an instance?

It will work using new Variable[32] and setting it always as id - 1 right?

Last edited by eyal282; 07-15-2017 at 17:05.
eyal282 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-15-2017 , 19:12   Re: Question about player variables
Reply With Quote #2

yes it will work
jimaway is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-16-2017 , 04:46   Re: Question about player variables
Reply With Quote #3

Processor time is much more valuable than 4 bytes of memory. Also makes the code easier to interpret (by humans). Just stick to 33.

Last edited by klippy; 07-16-2017 at 04:47.
klippy is offline
Reply


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 23:02.


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