Quote:
Originally Posted by rak
PHP Code:
if (!killer || !victim) // ! in front of id ?
PHP Code:
if (killer <= 0 || victim <= 0)
|
That's wrong. ! means not. In this case, it means if not value, meaning if there is no value.
For there to be no value, it would have to have 0.
Here's an example:
Code:
new var1 = 200;
new var2 = -10;
new var3 = 0;
if(var1) // true
if(var2) // true
if(var3) // false
// !var1 = not 200 = 0
// !var2 = not -10 = 0
// !var3 = not 0 = 1
if(!var1) // false
if(!var2) // false
if(!var3) // true
__________________