mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 33
M
mruno Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2002
Posts: 33
Hash -u is not unsetting when I am sharing the same script in more than one mIRC and have edited the script in one of the mIRCs and have not reloaded the script in another mIRC.

Reproduce with the following steps:
1) have two mirc's running
2) create a script (example.mrc) with the following code:
Code:
alias -l iseven return $iif(2 // $1,$true,$false)
alias -l isodd return $iif(!$iseven($1),$true,$false)
on *:START: { .timer1Minute.Timer -o 0 60 1Minute.Timer.Command }
alias 1Minute.Timer.Command {
if ($iseven($asctime(n))) {
    hadd -u45 test unset 1
  }
  elseif ($hget(test,unset)) echo -st Hash not unsetting
}

3) load example.mrc in both mIRCs
4) make sure 1Minute.Timer timer is running, if not type /timer1Minute.Timer -o 0 60 1Minute.Timer.Command
5) Have Monitor File Changes enabled in the script options (ALT+R, Options menu)
6) In one of the mIRC's open up example.mrc in the script editor and make a few changes such as adding comments
7) Wait a a couple minutes and then observe "hash not unsetting" in the other mIRC.

Joined: Dec 2002
Posts: 33
M
mruno Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2002
Posts: 33
forgot to create the hash table. so code would be:

Code:
alias -l iseven return $iif(2 // $1,$true,$false)
alias -l isodd return $iif(!$iseven($1),$true,$false)
on *:START: {
.timer1Minute.Timer -o 0 60 1Minute.Timer.Command
if (!$hget(test)) hmake test
}
alias 1Minute.Timer.Command {
if ($iseven($asctime(n))) {
    hadd -u45 test unset 1
  }
  elseif ($hget(test,unset)) echo -st Hash not unsetting
}


Link Copied to Clipboard