SA-MP Forums Archive
[Help]Boolean - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help]Boolean (/showthread.php?tid=105404)



[Help]Boolean - Dirty_bum - 29.10.2009

Can someone tell me what a Boolean is??
i've try'd searching the forums no good results..
I've looked in wiki for it, did't find
i've even try'd Wikipedia which i did find but there was like 5 or 7 different types

I just wana know what it does, and how to use it properly, as have no clue, as-usual...

Thanks


Re: [Help]Boolean - Peter_Corneile - 29.10.2009

Quote:
Originally Posted by Dirty_bum
Can someone tell me what a Boolean is??
i've try'd searching the forums no good results..
I've looked in wiki for it, did't find
i've even try'd Wikipedia which i did find but there was like 5 or 7 different types

I just wana know what it does i have no clue, as-usual...

Thanks
Did you really search on forum ?


Re: [Help]Boolean - Dirty_bum - 29.10.2009

What did i say up there?

http://www.******.ie/search?hl=en&client=firefox-a&rls=org.mozilla:en-GBfficial&ei=Ok7pSvPRGIX8sQPG1JHiCA&sa=X&oi=spel l&resnum=0&ct=result&cd=1&ved=0CA4QBSgA&q=boolea n+-+site%3Aforum.sa-mp.com&spell=1

....


Re: [Help]Boolean - Peter_Corneile - 29.10.2009

Quote:
Originally Posted by Dirty_bum
Yeah right , and i have never heard anything about a Boolean


Re: [Help]Boolean - Google63 - 29.10.2009

http://en.wikipedia.org/wiki/Boolean

You didn't search wiki at all as i see....


Re: [Help]Boolean - Dirty_bum - 29.10.2009

Quote:
Originally Posted by JoeBullet
http://en.wikipedia.org/wiki/Boolean

You didn't search wiki at all as i see....
So all thoses different definitions are all the same thing?.....
All thoses can tell me how to use it?

p.s i did search on wiki and got that page...


Re: [Help]Boolean - Google63 - 29.10.2009

Look in Boolean logic for full understanding, but here is all you must know.

Usage in PAWN:
Код:
new
     bool: orange;
Now, variable "orange" can ONLY be TRUE or FALSE.

If you assign to that variable char, float or anything that isn't TRUE or FALSE, compiler will complain...

Setting variable to true/false is like anything else:
Код:
orange = true;
orange = false;
Condition:
Код:
if(orange == true) OR if(orange)
if(orange == false) OR if(!orange)



Re: [Help]Boolean - Dirty_bum - 29.10.2009

Quote:
Originally Posted by JoeBullet
Look in Boolean logic for full understanding, but here is all you must know.

Usage in PAWN:
Код:
new
     bool: orange;
Now, variable "orange" can ONLY be TRUE or FALSE.

If you assign to that variable char, float or anything that isn't TRUE or FALSE, compiler will complain...

Setting variable to true/false is like anything else:
Код:
orange = true;
orange = false;
Condition:
Код:
if(orange == true) OR if(orange)
if(orange == false) OR if(!orange)
Ohh, Thanks very much


AW: [Help]Boolean - ULLLIIK - 20.10.2010

oh good. thank you


Re: [Help]Boolean - LarzI - 20.10.2010

pawn Код:
myBooleanVariable = true; //or 1
myBooleanVariable = false; //or 0
@******:

I didn't know there was a Bool tag too.. o.o
Is it just like float and Float?
I mean, like it's better to use Bool than bool?