Simple Help.
#1

pawn Код:
new Text:Info[5][MAX_PLAYERS char]; //Seems to work fine for me.
//or
new Text:Info[MAX_PLAYERS][5]; //Didn't try this.
Basically what I'm trying to do is to make 5 textdraws for each player. So, which one of the above is good/correct?
And some tips will be appreciated.
Reply
#2

This one:
PHP код:
new Text:Info[MAX_PLAYERS][5]; 
The first one, works only for the first 255 players and only to the first 255 textdraws .
Reply
#3

Quote:
Originally Posted by MoroDan
Посмотреть сообщение
This one:
PHP код:
new Text:Info[MAX_PLAYERS][5]; 
The first one, works only for the first 255 players and only to the first 255 textdraws .
Reason please?
Reply
#4

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
Reason please?
If you declare like this:
PHP код:
new array[100]; 
There will be: 100 cells * 4 bytes
And this array can stock vals from [-(2 ^ 31), (2^31)]

But if you declare like this:
PHP код:
new array[100 char]; 
There will be: 100 cells
And this array can stock vals from [0, 2^8-1]
If your val will exceeds 255, it will take the module.

^ - means power
Reply
#5

Thank you for the help. rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)