Pvar or global variable?
#1

Well, deciding between using Pvar or a global variable.

like..

SetPVar Kills

or..

new Kills[MAX_PLAYERS]

or...

using my account system to save it.

enum
kills
-

Witch would be more relieable.
Reply
#2

I would go with PVars.
Reply
#3

See here.
Reply
#4

PVars are slower, but they use less memory. Global variables are faster, and they use memory.

I'm using global variables in a lot of things, and using PVars in some circumstances (such as Strings)
Reply
#5

Alright, sounds sexy.
Reply
#6

Yeah, i agree with MrDeath.
Reply
#7

If you want to save user's stats and change them in the future, use global vars. I'm suing PVars for smaller things, like a one-time restore of a variable(Health,ID of a player, etc').

Edit: if you have already got an account system, USE IT! (enum)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)