Quote:
Originally Posted by Sylwester
Why double negation? It doesn't change anything here and in the end it's still auto conversion to int.
Did you mean:
Code:
equali("rr", cmd[_:(cmd[0] == '!' || cmd[0] == '/' || cmd[0] == '.')])
?
|
Nope. Essentially
this. There is more discussion about it in the thread.
But, now that I think of it, it should be something like:
Code:
equali("rr", cmd[(cmd[0] == '!' || cmd[0] == '/' || cmd[0] == '.') ? 1 : 0])
But because Pawn is typeless it may work your way without fail. Basically the result of (cmd[0] == '!' || cmd[0] == '/' || cmd[0] == '.') cannot be -1 or 3 (i.e. anything not 1 or 0; all of which evaluate as true) or it will case a index out of bounds.
__________________