Difference Between ?
#1

what's the difference between:
pawn Код:
new bool bla bla
and
pawn Код:
new bla bla
is it just for True or False and 1 or 0

or does it make another sense ?
Reply
#2

Quote:
Originally Posted by AnonScripter
Посмотреть сообщение
what's the difference between:
pawn Код:
new bool bla bla
and
pawn Код:
new bla bla
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
Reply
#3

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
Reply
#4

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.
Reply
#5

Код:
new bool:
"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
"new" is a Normal Variable that can be use by any numbers.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)