SA-MP Forums Archive
sizeof second dimension of 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: sizeof second dimension of array? (/showthread.php?tid=364018)



sizeof second dimension of array? - SEnergy - 29.07.2012

let's say I have this array
pawn Код:
new a[MAX_PLAYERS][128]
how can I get size of second dimension, so 128?

doing
pawn Код:
sizeof(a[playerid]);
is returning error, however in c++ it works perfectly :X

pawn Код:
char a[500][128];
cout << sizeof(a[1]);
output: 128


Re: sizeof second dimension of array? - Vince - 29.07.2012

Remove the index. Just
pawn Код:
sizeof(a[])



Re: sizeof second dimension of array? - SEnergy - 29.07.2012

Quote:
Originally Posted by Vince
Посмотреть сообщение
Remove the index. Just
pawn Код:
sizeof(a[])
thanks!