Booleans
#9

Quote:
Originally Posted by Slice
Посмотреть сообщение
Well, no, the only thing the "bool" tag does is tell the compiler to complain (no pun intended) if you give the variable anything but true or false, or if you compare it to anything but true or false.
"true" is essentially 1 and "false" 0.
You punster, you. And alright, that explains it. Thanks!

Quote:
Originally Posted by Vince
Посмотреть сообщение
To save space you could opt for a packed array;

pawn Код:
new bool:g_isLogged[MAX_PLAYERS char];

g_isLogged{playerid} = true; // Note: Curly brackets!
Okay, could I ask you to explain what the "char" tag does after MAX_PLAYERS, and what it does that causes me to have to use curly brackets around the playerid?
Reply


Messages In This Thread
Booleans - by 2KY - 18.01.2012, 20:52
Re: Booleans - by Vince - 18.01.2012, 20:56
Re: Booleans - by spedico - 18.01.2012, 20:57
Re: Booleans - by Slice - 18.01.2012, 20:58
Re: Booleans - by Baboon - 18.01.2012, 20:58
Re: Booleans - by 2KY - 18.01.2012, 21:00
Re: Booleans - by Slice - 18.01.2012, 21:04
Re: Booleans - by Vince - 18.01.2012, 21:15
Re: Booleans - by 2KY - 18.01.2012, 21:18
Re: Booleans - by Slice - 19.01.2012, 05:05

Forum Jump:


Users browsing this thread: 3 Guest(s)