[Tutorial] Use bool variables: It's easy.
#2

There is an other way to check for booleans :

pawn Code:
if(Easy == true)
Can be replaced by

pawn Code:
if(Easy)
And of course "if(Easy == false)" (not in your tutorial but very useful when you needs booleans) can be replaced by

pawn Code:
if(!Easy)
Basically, when you use "!something", the compiler checks if "something" is equal to 0. If it is, then the condition returns true and it executes what's between brackets.
And checking a value like this

pawn Code:
if(something)
Don't check if the variable is equal to 1 but checks if the variable is different from 0.
You should add these informations in your tutorial.
Reply


Messages In This Thread
Use bool variables: It's easy. - by Baltimore - 11.07.2014, 16:31
Re : Use bool variables: It's easy. - by S4t3K - 11.07.2014, 16:41
Re: Use bool variables: It's easy. - by Baltimore - 11.07.2014, 16:46
Re: Use bool variables: It's easy. - by sammp - 11.07.2014, 20:32
Re : Use bool variables: It's easy. - by S4t3K - 12.07.2014, 19:17
Re: Use bool variables: It's easy. - by Vince - 12.07.2014, 19:30
Re : Use bool variables: It's easy. - by S4t3K - 12.07.2014, 19:52
Re: Use bool variables: It's easy. - by Vince - 12.07.2014, 20:07
Re: Use bool variables: It's easy. - by PT - 13.07.2014, 00:26
Re: Use bool variables: It's easy. - by Juvanii - 13.07.2014, 06:06

Forum Jump:


Users browsing this thread: 2 Guest(s)