Raised This Month: $ Target: $400
 0% 

Message's bugged!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-07-2012 , 21:52   Re: Message's bugged!
Reply With Quote #1

Code:
if(containi(message, "i love you") != -1)
use containi as to make sure its is NOT case sensitive.
containi returns -1 on failure, so just make sure that it DOES NOT EQUAL -1, rather than >= 0 -a more direct way of doing it.
Liverwiz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-08-2012 , 01:49   Re: Message's bugged!
Reply With Quote #2

Are you sure you hooked it correctly? Everything looks correct to me.

Quote:
Originally Posted by Liverwiz View Post
Code:
if(containi(message, "i love you") != -1)
use containi as to make sure its is NOT case sensitive.
containi returns -1 on failure, so just make sure that it DOES NOT EQUAL -1, rather than >= 0 -a more direct way of doing it.
>=0 and !=-1 are the same thing (regarding contain and containi). That's twice now. Also, he doesn't have to use case insensitive functions if he doesn't want to do so.
__________________

Last edited by fysiks; 05-08-2012 at 01:49.
fysiks is offline
Reply



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 00:29.


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