I need just an answer!
#1

Hello,

I know this will be a silly question but what is the use of " ! "?

for example
Код:
 PSettings[i][pAdmin] != 1;
<< I created this for example

2_ the use of " ? "
Reply
#2

The != is "Not Equal" to the thing it's before.

Is that what you wanted to know?
Reply
#3

Cat != Dog
Cat == Kitty

But if you want set what you set use PSettings[i][pAdmin] = 0; as 0 isnt 1
Reply
#4

yes I understand now thanks for you all(two), but can I know as well the use of " ? " and " * "
Reply
#5

well any answer please?
Reply
#6

They are wildcards, but I can only think of two function to use them with: fexist and fmatch. The ? matches a single character, the * matches zero or more characters.
The question mark is also used in the triadic operator (advanced) and the asterisk is of course also the multiplication operator.

I suggest you read: https://sampwiki.blast.hk/wiki/Control_Structures
Reply
#7

* is the multiplication symbol and ? is used for the ternary operator, ex:

pawn Код:
CatEqualsKitty()
{
   return (Cat == Kitty) ? 1 : 0;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)