What does 'char' in an array?
#1

Hello,
I saw many scripts using that when arrays are declared.
pawn Код:
new array[MAX_PLAYERS char];
What does it do, how does it work?

Thank you.
Reply
#2

char. I do use it to lower the array size.
Reply
#3

Yes, char lower your memory. But you have to know that you can only save values from
0 until 255.

and if you want you can also use it like


PHP код:
array{playerid} = 1
but there is no different of using

PHP код:
array[playerid
Reply
#4

There IS a big difference actually, since every cell now saves the data of four players instead of one. Using the square braces will overwrite anything that's saved there, from those four players.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)