PDA

View Full Version : I need just an answer!


Youice
11/05/2012, 09:41 PM
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 " ? "

iGetty
11/05/2012, 09:46 PM
The != is "Not Equal" to the thing it's before.

Is that what you wanted to know?

ikey07
11/05/2012, 09:48 PM
Cat != Dog
Cat == Kitty

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

Youice
11/05/2012, 09:55 PM
yes I understand now thanks for you all(two), but can I know as well the use of " ? " and " * "

Youice
12/05/2012, 04:30 PM
well any answer please?

Vince
12/05/2012, 04:35 PM
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: http://wiki.sa-mp.com/wiki/Control_Structures

SuperViper
12/05/2012, 04:51 PM
* is the multiplication symbol and ? is used for the ternary operator, ex:

CatEqualsKitty()
{
return (Cat == Kitty) ? 1 : 0;
}