mIRC Home    About    Download    Register    News    Help

Print Thread
Vote script freezing mIRC when event is triggered #94056 13/08/04 06:52 PM
Joined: Aug 2003
Posts: 2
L
Legato Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
L
Joined: Aug 2003
Posts: 2
I've been been trying to fix the problem for a while with no luck. I the script is located here. IRC freezes when ever someone enters a command that would vote for something. Thanks in advance to anyone that helps.

Re: Vote script freezing mIRC when event is triggered #94057 14/08/04 01:14 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
You have a problem with the following While loop:

while (%vote.choice. [ $+ [ $calc(%counterfive) ] ] != null) {

%counterfive keeps increasing no matter what. I'm going to look into it and find where exactly is the problem.

Re: Vote script freezing mIRC when event is triggered #94058 14/08/04 01:34 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
I have yet found the problem, but I did found a bug:

if ((%vote.cast.nick. [ $+ [ $calc(%counterfour) ] ] == $nick) || (%vote.cast.address. [ $+ [ $calc(%counterfour) ] ] == $address($nick,2)) {


I get If invalid format line 380. You have 6 "(" and 5 ")"


This line shoule be:
if ((%vote.cast.nick. [ $+ [ $calc(%counterfour) ] ] == $nick) || (%vote.cast.address. [ $+ [ $calc(%counterfour) ] ] == $address($nick,2))) {




Re: Vote script freezing mIRC when event is triggered #94059 14/08/04 02:02 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
It's either $null or you need to have a %vote.choice. [ $+ [ $calc(%counterfive) ] ] that actually has the word null in it...

Re: Vote script freezing mIRC when event is triggered #94060 14/08/04 02:10 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
I checked his script and even though %vote.choice. [ $+ [ $calc(%counterfive) ] ] is $null it keeps staying inside the while loop (A bug with mIRC maybe??)

Maybe his problem is with all the variables. I'm currenlt converting his script to hash table based script. Then I'll check if it works better.

Re: Vote script freezing mIRC when event is triggered #94061 14/08/04 03:19 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
I have't understand what Kelder wanted to say, and I kep invertigating it... LOL, Now I know what he wanted to say.

The line:
while (%vote.choice. [ $+ [ $calc(%counterfive) ] ] != null) {


Which I already wrote to be the source of the problem has a NULL instead of $NULL, so it doesn't exit the loop.

:tongue:

Re: Vote script freezing mIRC when event is triggered #94062 14/08/04 05:42 PM
Joined: Aug 2003
Posts: 2
L
Legato Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
L
Joined: Aug 2003
Posts: 2
Thanks for the help, the script no longer freezes. It's always something simple that I miss... I've noticed two other problems with it though.
1-- In the "votestats" Dialog, list ID# 53. The horizontal scrollbar appears, however it doesn't scroll when an item in the list exceeds the width of the window.
2-- People are allowed to make multiple votes, my script for preventing that is towards the very end of the document.
Here's another link to the script.

Re: Vote script freezing mIRC when event is triggered #94063 14/08/04 09:07 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
1 - use /did -z <dialog name> <id> to enable the scroll bar smile

2 - have no idea ;P


"All we are saying is give peace a chance" -- John Lennon