SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 09/10/2010, 08:40 PM   #1
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,141
Reputation: 3
Default Question about vars..

What is better/faster

Code:
enum pVar
{
    Skill,
    Score,
   //etc...
}
new pInfo[pVar][MAX_PLAYERS]

OR..

Code:
new Skill[MAX_PLAYERS];
new Score[MAX_PLAYERS];
//etc...

Thanks
The_Moddler is offline  
Old 09/10/2010, 08:41 PM   #2
Burridge
High-roller
 
Join Date: Nov 2008
Location: England
Posts: 2,036
Reputation: 39
Default Re: Question about vars..

I don't think either are faster than the other. (I ain't sure) However, I suggest using PVars, as they may be slower, but a lot more optimized!
__________________
Burridge is offline  
Old 09/10/2010, 08:53 PM   #3
WillyP
High-roller
 
WillyP's Avatar
 
Join Date: Jul 2010
Location: England
Posts: 2,216
Reputation: 63
Default Re: Question about vars..

pVars are slower than normal variables, but i use normal variabes because their shorter and easier (in my eyes) to use xd
__________________
once average now terrible
WillyP is offline  
Old 09/10/2010, 08:55 PM   #4
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,141
Reputation: 3
Default Re: Question about vars..

Quote:
Originally Posted by [FU]Victious View Post
pVars are slower than normal variables, but i use normal variabes because their shorter and easier (in my eyes) to use xd
Yep, I like normal variables too, because they are shorter :P

Still, wich one is best?

I think they are the same..
__________________
The_Moddler is offline  
Old 09/10/2010, 08:56 PM   #5
Voldemort
Gangsta
 
Voldemort's Avatar
 
Join Date: Aug 2010
Posts: 582
Reputation: 26
Default Re: Question about vars..

They are same, how many peoples so many answers
__________________


Voldemort is offline  
Old 09/10/2010, 09:00 PM   #6
WillyP
High-roller
 
WillyP's Avatar
 
Join Date: Jul 2010
Location: England
Posts: 2,216
Reputation: 63
Default Re: Question about vars..

Quote:
Originally Posted by Voldemort View Post
They are same, how many peoples so many answers
Theres a topic that proves that normal variables are faster than pVars
__________________
once average now terrible
WillyP is offline  
Old 09/10/2010, 09:03 PM   #7
Voldemort
Gangsta
 
Voldemort's Avatar
 
Join Date: Aug 2010
Posts: 582
Reputation: 26
Default Re: Question about vars..

Quote:
Originally Posted by [FU]Victious View Post
Theres a topic that proves that normal variables are faster than pVars
We talk about who is best not faster, so here everyone will suggest that what they use.
__________________


Voldemort is offline  
Old 10/10/2010, 07:40 AM   #8
Burridge
High-roller
 
Join Date: Nov 2008
Location: England
Posts: 2,036
Reputation: 39
Default Re: Question about vars..

You all went off topic. Read his main post. He didn't say anything about the PVar system. I simply mentioned it as a more optimized alternative.
__________________
Burridge is offline  
Old 10/10/2010, 11:52 AM   #9
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,141
Reputation: 3
Default Re: Question about vars..

Anyway, I think that they are the same (main post).
__________________
The_Moddler is offline  
 

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vars! ColdXX Help Archive 2 20/07/2010 09:53 PM
Local vs. Global vars CC. Help Archive 0 25/03/2010 03:06 PM
How to use vars in textdraws Zafire1410 Help Archive 6 24/08/2009 12:30 AM
I think im abusing VARS Paladin Help Archive 9 02/08/2009 07:18 PM
Adding new vars to the server.cfg ledzep Help Archive 6 27/06/2009 11:08 AM


All times are GMT. The time now is 03:42 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.