mIRC Home    About    Download    Register    News    Help

Print Thread
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.

Joined: Feb 2003
Posts: 282
S
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.

Joined: Feb 2003
Posts: 282
S
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))) {




Joined: Apr 2003
Posts: 701
K
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...

Joined: Feb 2003
Posts: 282
S
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.

Joined: Feb 2003
Posts: 282
S
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:

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.

Joined: Feb 2004
Posts: 714
Z
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

Link Copied to Clipboard