can i use new variable[MAX_PLAYERS char];

So, i'm new in using char tag, can i use char inside MAX_PLAYERS?


Don't think so but that's just me, Try it and see.

afaik it only work with 1D array.

Read here:
Note: " ....... When you know you don't need negative values and won't ever exceed 255 ......."

Yes you can char arrays as long as its value doesnt exceed 255 or go negative. Moreover you can pack strings, which is alot more efficient, here an include for a safe formatting and using, i suggest using.

I had tried in the past as I was curious myself and it did not work using {} on the playerid index. I did a test just a minute ago and it seems to be working good with [].

But.. change:
pawn Код:
g_lib_function_FPN_[playerid] = !'\0';
pawn Код:
g_lib_function_FPN_[playerid]{0} = '\0';
Originally Posted by Niko_boy
Посмотреть сообщение
afaik it only work with 1D array.
No, it does work with 2D and 3D arrays.

You can use 2D BUT, if MAX_PLAYERS is for example 200 - max index is 50 (MAX_PLAYERS/4) in [ ] so if you got more than 50 players online - fail

Ok, thanks for help i understand now!

Forum Jump:

Users browsing this thread: