[Tutorial] Player Variables vs Normal Variables.
#15

Quote:
Originally Posted by Carlton
View Post
Good, once again PVars failed
Failed? Well obviously they fail when you're not using them properly. With that logic, I can say gas fails because it can't run my diesel boat.

Quote:
Originally Posted by Calgon
View Post
Yes, and if you think about it, that's gonna come back and bite you later on, when you have a bunch of slow PVars for your script to continuously process.

I use PVars in certain cases, as it seems more practical and more efficient, say for example I have a variable that really only has 1 use, no point creating a normal player variable for it, waste of 500 cells (or whatever MAX_PLAYERS is defined as).
Consider utilizing bit manipulation aswell as using the "char" keyword (arrays with the char keyword will contain only 1 byte per slot; however, only capable of carrying 8 bits (value 0-255)).
If you, for example, have a variable that tells you whether a player is in a race or not, you could store 1 value per bit; thus, using only 16 cells for 500 players.
Reply


Messages In This Thread
Player Variables vs Normal Variables. - by Carlton - 20.07.2010, 02:52
Re: Player Variables vs Normal Variables. - by krisk - 20.07.2010, 03:01
Re: Player Variables vs Normal Variables. - by [HiC]TheKiller - 20.07.2010, 04:39
Re: Player Variables vs Normal Variables. - by Calgon - 20.07.2010, 05:02
Re: Player Variables vs Normal Variables. - by Carlton - 20.07.2010, 20:02
Re: Player Variables vs Normal Variables. - by [03]Garsino - 11.08.2010, 18:08
Re: Player Variables vs Normal Variables. - by ikey07 - 11.08.2010, 19:32
Re: Player Variables vs Normal Variables. - by Calgon - 11.08.2010, 19:37
Re: Player Variables vs Normal Variables. - by Jeffry - 11.08.2010, 19:41
Re: Player Variables vs Normal Variables. - by Calgon - 11.08.2010, 19:54
Re: Player Variables vs Normal Variables. - by Carlton - 11.08.2010, 21:23
Re: Player Variables vs Normal Variables. - by xxxDunecatxxx - 26.09.2010, 05:44
Re: Player Variables vs Normal Variables. - by cyber_punk - 26.09.2010, 15:35
Re: Player Variables vs Normal Variables. - by Calgon - 26.09.2010, 15:38
Re: Player Variables vs Normal Variables. - by Slice - 26.09.2010, 16:24
Re: Player Variables vs Normal Variables. - by Kwarde - 08.10.2010, 05:07
Re: Player Variables vs Normal Variables. - by Slice - 08.10.2010, 16:45
Re: Player Variables vs Normal Variables. - by chris_reef - 12.04.2011, 17:06
Re: Player Variables vs Normal Variables. - by [03]Garsino - 12.04.2011, 18:27
Re: Player Variables vs Normal Variables. - by Gamer_Z - 12.04.2011, 18:45
Re: Player Variables vs Normal Variables. - by chris_reef - 12.04.2011, 23:38
Re: Player Variables vs Normal Variables. - by [03]Garsino - 13.04.2011, 05:18
Re: Player Variables vs Normal Variables. - by Kalcor - 16.07.2011, 07:39
Re: Player Variables vs Normal Variables. - by BobbMarley - 09.09.2016, 19:15
Re: Player Variables vs Normal Variables. - by Shinja - 09.09.2016, 19:19

Forum Jump:


Users browsing this thread: 1 Guest(s)