A doubt with variables
#6

I'll try explain this without saying something incorrect in real basic terms. Adding char to a variable reduces the size of the variable and is awesome for reducing sizes. Char restricts variables in the way that it only allows values from 0-255 (no negatives) but with bool there is only two values so why not :P? variable[MAX_PLAYERS] could only have a value from 0 - 255 though and if you want anything over you have to use a normal variable. Char's are accessed in a different way also e.g.

Normal variable
pawn Код:
variable[playerid] = true;
Char variable
pawn Код:
variable{playerid} = true;
Someone correct me if I'm wrong on any parts of this.
Reply


Messages In This Thread
A doubt with variables - by JavoDiaz - 26.12.2012, 07:49
Re: A doubt with variables - by mineralo - 26.12.2012, 09:51
Re: A doubt with variables - by Konstantinos - 26.12.2012, 09:55
Re: A doubt with variables - by JavoDiaz - 28.12.2012, 02:21
Re: A doubt with variables - by Lordzy - 28.12.2012, 02:44
Re: A doubt with variables - by [HiC]TheKiller - 28.12.2012, 03:06
Re: A doubt with variables - by JavoDiaz - 28.12.2012, 20:16
Re: A doubt with variables - by JavoDiaz - 29.12.2012, 00:48
Re: A doubt with variables - by JavoDiaz - 29.12.2012, 01:50

Forum Jump:


Users browsing this thread: 3 Guest(s)