Message's bugged!
Hello there,
i hooked say, but for example im saying 'You know i love you' i still unlock the phrase, it has to be only: 'i love you' for example. What am i doing wrong here? PHP Code:
|
Re: Message's bugged!
Code:
if(containi(message, "i love you") != -1)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. |
Re: Message's bugged!
Are you sure you hooked it correctly? Everything looks correct to me.
Quote:
|
Re: Message's bugged!
Use equal, it checks if 2 strings are the same, which you need in this case.
Contain only checks if one string contains the other, but that doesn't mean they are the same. |
Re: Message's bugged!
@fysiks, Im pretty sure that i hooked it correctly
@Veco, What do you mean with use equal? |
Re: Message's bugged!
Ok, you are saying "You know I love you". The string that you need is "I love you".
Then contain cheks if the message contains the needed string, so that's: "You know I love you". It just checks if the needed string is somewhere in the message, not if the message is the same as the string you want. So you need equal - it will check if the message is exactly the same as the string: "You know I love you" won't pass this time, because there is also "You know ", which you don't want, so the funtion will be called only if you type "I love you" (nothing more, nothing less) - that's what you need. |
Re: Message's bugged!
But i can unlock it either in another sentec, for example: owkadoawjlad i love you.
It will still unlock :s |
Re: Message's bugged!
Use equal and you won't have such problem.
|
Re: Message's bugged!
Thank you sir, worked really well :)
|
Re: Message's bugged!
Using equal is not a solution to finding a string within a string like he was originally trying to do. I don't know how he got it to work with equal because it's not possible to say "You know I love you" and use equal() to know if the string "i love you" is in it.
|
| All times are GMT -4. The time now is 00:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.