SA-MP Forums Archive
I need just an answer! - 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: I need just an answer! (/showthread.php?tid=341729)



I need just an answer! - Youice - 11.05.2012

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 " ? "


Re: I need just an answer! - iGetty - 11.05.2012

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

Is that what you wanted to know?


Re: I need just an answer! - ikey07 - 11.05.2012

Cat != Dog
Cat == Kitty

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


Re: I need just an answer! - Youice - 11.05.2012

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


Re: I need just an answer! - Youice - 12.05.2012

well any answer please?


Re: I need just an answer! - Vince - 12.05.2012

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


Re: I need just an answer! - SuperViper - 12.05.2012

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

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