mIRC Homepage
Posted By: TheRandomDog Matching Text - 15/05/12 10:10 PM
I have a question about matching the text up.

I have: on 1:TEXT:test:#channelname:/say Test.

It does not work though when I say it. Assuming that it was because I was trying my own script, I had another chatter say it. It still didn't work.

I'm following the FAQ on the mIRC page and the built-in mIRC Help with the program itself, but it says to do exactly what I'm doing. Help please?
Posted By: Loki12583 Re: Matching Text - 15/05/12 10:29 PM
That should work fine. Note that if you have another text event defined above this one in the same script (and the text matches that one as well), this one will not be reached.
Posted By: TheRandomDog Re: Matching Text - 15/05/12 10:48 PM
According to the script, there is not another one that matches the same word. It's still not working, so I had a question. Does someone else need to say it? Any possible mistakes to keep it from happening? There's not an error message.
Posted By: Wims Re: Matching Text - 16/05/12 01:24 AM
Yes, on text event can be triggered only by someone else, and make sure the user isn't using colors or similar.
Posted By: landonsandor Re: Matching Text - 16/05/12 06:09 PM
if you have another ON TEXT event anywhere in the script file, regardless of what it's looking for, only the first one will work. By your response, it SOUNDS like you have a 2nd ON TEXT event looking at different match. If that's true, you'd have to combine them into ONE event:

Code:
on *:text:*:#: {
  if ((chan1 == #channel) && (text-to-match1 == text1) { stuff1 }
  if ((chan2 == #channe2) && (text-to-match2 == text2) { stuff2 }
}
Posted By: Loki12583 Re: Matching Text - 16/05/12 07:57 PM
Originally Posted By: landonsandor
if you have another ON TEXT event anywhere in the script file, regardless of what it's looking for, only the first one will work.

That's ludicrous. The following works perfectly.

Code:
on *:text:text1:#:stuff1
on *:text:text2:#:stuff2
Posted By: Riamus2 Re: Matching Text - 16/05/12 09:36 PM
Only the first matching event will trigger, but you can have as many different events in the file as you want as long as they either don't overlap or the overlapping is desired.
Posted By: landonsandor Re: Matching Text - 18/05/12 12:27 AM
I stand corrected twice for the same thing. yeah, I certainly miscommunicated there. Thanks for the cleanup
Posted By: TheRandomDog Re: Matching Text - 02/06/12 05:18 PM
Thanks guys, I figured it out.
© mIRC Discussion Forums