Negating Conditions
To invert the condition and produce a truthy result when the conditions is not met, use the not operator. This operator negates the condition that follows it.
if not is_player_playing 0then // execute this code if the player is not playingendnot can be used with math expressions as well:
if not x > 5 // if x is not greater than 5then //endSome operators have a negated version, i.e. an operator that does the opposite. For example, == is the equality operator, and <> is the inequality operator. The following two conditions are equivalent:
not x == 5x <> 5Here is a list of negated operators:
| Operator | Negated operator |
|---|---|
== | <> |
> | <= |
< | >= |
>= | < |
<= | > |