mIRC Homepage
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.
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.
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))) {



It's either $null or you need to have a %vote.choice. [ $+ [ $calc(%counterfive) ] ] that actually has the word null in it...
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.
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:
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.
1 - use /did -z <dialog name> <id> to enable the scroll bar smile

2 - have no idea ;P
© mIRC Discussion Forums