3 variables vs 3 cell array - 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: 3 variables vs 3 cell array (
/showthread.php?tid=336352)
3 variables vs 3 cell array -
MP2 - 22.04.2012
Which is better?
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
or
pawn Код:
new Float:playerPos[3];
GetPlayerPos(playerid, playerPos[0], playerPos[1], playerPos[2]);
If you don't know about efficiency and stuff, please don't bother replying.
Re: 3 variables vs 3 cell array -
.FuneraL. - 22.04.2012
Certainly not tell you whether it is better, or faster to use it, the more I can say that it is easier to use thereby
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
Re: 3 variables vs 3 cell array -
lolumadd_ - 22.04.2012
As far as I know
is the equivalent of doing
Код:
new Variable0,Variable1,Variable2;
Just cleaner.