Which one? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Which one? (
/showthread.php?tid=368269)
Which one? -
Nightmare[TR] - 12.08.2012
Hi,i know the answer but i want to ask you too.
Which one is faster?Type A or Type B?
Type A:
pawn Код:
new try[MAX_PLAYERS];
try[playerid] = 1;
Type B:
pawn Код:
SetPVarInt(playerid,"try",1);
Re: Which one? -
FalconX - 12.08.2012
Quote:
Originally Posted by Nightmare[TR]
Hi,i know the answer but i want to ask you too.
Which one is faster?Type A or Type B?
Type A:
pawn Код:
new try[MAX_PLAYERS]; try[playerid] = 1;
Type B:
pawn Код:
SetPVarInt(playerid,"try",1);
|
I would go with type "A" because I believe variables are always faster then PVars. And it is also said by *******:
"99% of the time you do not need, and should not use, PVars"
https://sampforum.blast.hk/showthread.php?tid=268499
*Correct me if I am wrong.