18.05.2017, 17:31
Quote:
|
Bool usually works with if or else commands if you set bool="true" the given command will work for the player but if you set bool="false" the command may refuse to work for the player. Int refers to an integral value,setting int value to work as a bool maybe a very bad idea as it is not a good way of scripting nor it works in most of the cases and gives errors.
--------------- Hope it helps! --------------- |
pawn Код:
new x = true;
pawn Код:
new bool:x = true;
pawn Код:
new bool:x = 1; // Will give a compiler warning, but works as expected (no error!)
pawn Код:
new x = bool:1;
PS: I'm not arguing for or against using the bool tag, but it's wrong to say there would be any errors or technical problems in using an integer as a boolean in PAWN. There can only be problems if you misinterpret the use of the variable.


