Given the general complexity of the lines in your script, and the sheer number of them, I'm going to make two general assumptions:

1) The problem is most likely your script. Judging by the complexity alone, it's very likely that you just did something wrong somewhere. It's *extremely* hard for even an experienced scripter to understand what is going on there, it looks like gibberish-- which would make it completely unsurprising for it to be a bug in your script, not a bug in mIRC.

2) Your script is way too long given what you expect it to do. At first glance I see if (<value> <= 59) followed by if (<value> >= 60).. these two lines alone should be turned into an if / else pair, not two separate if (condition)s. Using else avoids the repetition of using the <value> twice, and simplifies the script, potentially reducing another point of error. You also use the same $hfind() function about 15 times in the same script... not only is this wildly inefficient, it's also once again extremely error prone. If you get a value, set it to a variable. It seems you actually did this for %oftotco2, but you don't do the same thing for $hfind(opts,*!*@*.*.*,%oftotco1,w). That would make your script much more readable and less error prone.

My suggestion would be to rewrite this from scratch in a READABLE fashion. If you can't understand what you're doing, it's more than likely that when something breaks, it's because you did something wrong and just don't know. I'm going with user error here, not a bug.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"