Max Player question.
#1

can anyone explain which difference is between
Code:
[MAX_PLAYERS]
and
Code:
[MAX_PLAYERS char]
. Does it matter if I use only
Code:
[MAX_PLAYERS char]
.
Reply
#2

Code:
[MAX_PLAYERS]
It's equal to 500 ( Maximum Players ) * 4 bytes per cell = 2000 bytes

Code:
[MAX_PLAYERS char]
It's equal to 500 ( Maximum Players ) * 1 bytes per cell = 500 bytes and it will take less memory
Reply
#3

Thank you but, does it matter if I use only [MAX_PLAYERS char] ?
Reply
#4

The answer depends on the values you want to use.

Use char only when the values are between 0-255. Any value out of the bounds will be wrapped into bounds.

Also when you use char in the script, you'll need to use { } for the indexes instead of [ ].

See: https://sampforum.blast.hk/showthread.php?tid=216730
-> "Char-arrays"
Reply
#5

Quote:
Originally Posted by Konstantinos
View Post
The answer depends on the values you want to use.

Use char only when the values are between 0-255. Any value out of the bounds will be wrapped into bounds.

Also when you use char in the script, you'll need to use { } for the indexes instead of [ ].

See: https://sampforum.blast.hk/showthread.php?tid=216730
-> "Char-arrays"
Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)