mIRC Home    About    Download    Register    News    Help

Print Thread
#104349 02/12/04 12:26 PM
Joined: Sep 2004
Posts: 59
M
MrDoom Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Sep 2004
Posts: 59
on ^*:TEXT:*:#my channel name:{

if ($calc($count($1-,?) + $count($1-,!)) >= 5) {

.ignore -pnu600 $nick 3

.msg $nick You used too much punctuation. You have been ignored.

halt

}

}

i was wondering why this would not work?i have it in my remotes section.what i am doing wrong here?

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
The ^ is used along with haltdef, in order to stop and original message from showing. halt will stop the rest of the event from happening, but it won't stop the default message. I don't know if it's a typo or not, but >= should be ==. One more thing... if you also want to ignore the person in channel, you need to add a "-c" to the switches.

Hope this helps smile
Zyzzyx.


"All we are saying is give peace a chance" -- John Lennon
Joined: Sep 2004
Posts: 59
M
MrDoom Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Sep 2004
Posts: 59
on *:TEXT:*:#my channel name:{

if ($calc($count($1-,?) + $count($1-,!)) >==5) {

.ignore -pnu600 $nick 3

.msg $nick You used too much punctuation. You have been ignored.

halt

}

}

ok so i changed the couple things,i don't quite understand where i have to put the -c switch,but if you could re-post this script how it should be i would greatly appreciate it,thanks alot!

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
/halt stops the default display just as /haltdef does.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The script is correct, although you could optimize it a bit by using a single $count: if ($count($1-,!,?) >= 5). There a couple of reasons for a correct script not to work, check all of them:

1) Is your Remote section turned on? Type /remote on to be sure.

2) You may have a bracket mismatch, ie { aren't paired with }. This may have happened somewhere outside the on TEXT event; it could still affect it. To check for bracket mismatches, click on the {} button in mIRC Editor.

3) You may have more than one on TEXT events in the same script file and some of them may overlap. For example, if your file has something like this:
on *:text:*:#:{ do this }
....
....
on *:text:*:#yourchannel:{ do that }

the second on TEXT will never trigger: the first one takes priority. Try moving your on TEXT in a separate file (Alt+R > File > New) and see if it works then.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Be careful with typos and spacing: in your first post you had:
if ($calc(...) >= 5)
which works. Now you have:
if ($calc(...) >==5)
which doesn't.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Sep 2004
Posts: 59
M
MrDoom Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Sep 2004
Posts: 59
thanks man i found the problem,works now,thanks for all the help. cool cool


Link Copied to Clipboard