SA-MP Forums Archive
Is there any differencce - 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: Is there any differencce (/showthread.php?tid=620576)



Is there any differencce - vassilis - 31.10.2016

Is there any difference if i do

PHP код:
PlayerTextTDName[MAX_PLAYERS][10]; 
PHP код:
PlayerTextTDName[10][MAX_PLAYERS]; 



Re: Is there any differencce - NaS - 31.10.2016

It's the same.

Just that most people use the first index for players, because every player has 10 TextDraws (in your case).
But it's totally legit the other way round, it's just depending on how you prefer it.

However there are situations, where the order is very important. In the first version you can assign all 10 textdraw IDs at once (not sure why you would do that, thats why it doesn't matter for your example).

But:

PHP код:
new A[4] = {1325};
new 
B[10][4];
// Later you can do:
B[3] = A;
// Doesn't work on this:
new C[4][10]; 



Re: Is there any differencce - vassilis - 31.10.2016

Quote:
Originally Posted by NaS
Посмотреть сообщение
It's the same.

Just that most people use the first index for players, because every player has 10 TextDraws (in your case).
But it's totally legit the other way round, it's just depending on how you prefer it.
Ok thank you NaS i know it's pretty silly question i just want to make sure i do it right!