Difference Between ? - 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)
+--- Thread: Difference Between ? (
/showthread.php?tid=473214)
Difference Between ? -
AnonScripter - 01.11.2013
what's the difference between:
and
is it just for True or False and 1 or 0
or does it make another sense ?
Re: Difference Between ? - Patrick - 01.11.2013
Quote:
Originally Posted by AnonScripter
what's the difference between:
and
is it just for True or False and 1 or 0
or does it make another sense ?
|
Boolean variable can be only set using true or false
Normal Variable can be use by any number.
More Information:
http://en.wikipedia.org/wiki/Boolean |
https://sampwiki.blast.hk/wiki/Scripting_Basics#Variables
Re: Difference Between ? -
Keyhead - 01.11.2013
I think the bools can only be true or false. So,
pawn Код:
new bool:bla // this can only be true or false
//where as
new bla// can equal to any number
Re: Difference Between ? -
Tropicali - 02.11.2013
A boolean or "bool" can be set to true or false.
For example, a common way boolean is used in SAMP is with a /gate command to check or determine whether the gate is open or closed, but it can be used for a lot of things.
Where-as "new bla" equals any digit/integer/number as others have said.
Re: Difference Between ? -
SAMProductions - 02.11.2013
"
new bool:" is a
Boolean or
Boolean Variable that can be only set using
True or False.
"
new bool:" Tag can only "
return 0" which is
False or "
return 1" which is
True.
"
new" is a
Normal Variable that can be use by any
numbers.