mIRC Homepage

Vote script freezing mIRC when event is triggered

Posted By: Legato

Vote script freezing mIRC when event is triggered - 13/08/04 06:52 PM

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.
Posted By: saragani

Re: Vote script freezing mIRC when event is triggered - 14/08/04 01:14 PM

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.
Posted By: saragani

Re: Vote script freezing mIRC when event is triggered - 14/08/04 01:34 PM

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))) {



Posted By: Kelder

Re: Vote script freezing mIRC when event is triggered - 14/08/04 02:02 PM

It's either $null or you need to have a %vote.choice. [ $+ [ $calc(%counterfive) ] ] that actually has the word null in it...
Posted By: saragani

Re: Vote script freezing mIRC when event is triggered - 14/08/04 02:10 PM

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.
Posted By: saragani

Re: Vote script freezing mIRC when event is triggered - 14/08/04 03:19 PM

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:
Posted By: Legato

Re: Vote script freezing mIRC when event is triggered - 14/08/04 05:42 PM

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.
Posted By: Zyzzyx26

Re: Vote script freezing mIRC when event is triggered - 14/08/04 09:07 PM

1 - use /did -z <dialog name> <id> to enable the scroll bar smile

2 - have no idea ;P
© 2021 mIRC Discussion Forums