Raised This Month: $ Target: $400
 0% 

Someone knows how to...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-27-2010 , 02:56   Re: Someone knows how to...
Reply With Quote #6

Quote:
Originally Posted by Sylwester View Post
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.
__________________

Last edited by fysiks; 05-27-2010 at 02:59.
fysiks is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode