mIRC Homepage
Posted By: gemeau50 Variable don't unset - 03/01/08 01:07 PM
mIRC version 6.31
Network Undernet

on @*:TEXT:*:channel: {
if ($nick isop $chan ) { return }
inc -u2 %txt $+ $nick
if ($eval($+(%,txt,$nick ),2) == 5) {
mode $chan +b $address($nick,2)
kick $chan $nick flood
}
}

/inc [-cszeuN] <%var> [value]
This increases the value of %var by value.

If you specify the -uN switch, %var is increased by the value once and then %var is unset N seconds later, assuming it is not set again by another script.

This script works fine until I open the "Scripts Editor" and click on tab "Variables". All active temporary variables "%txt $+ $nick" freeze. They do not unset after 2 seconds. They become permanent and when the count reaches "5", out go the users. Clients are not that pleased.

Is it a bug or a flaw in the script?

Tx in advance

Posted By: RoCk Re: Variable don't unset - 03/01/08 01:21 PM

The flaw is clicking the OK button or the Sort button while viewing the Variables tab, don't do that because all variables viewable under the Variables tab will be permanently set, instead click the Cancel button or switch to another tab and the variables that are currently viewable under the Variables tab will not be saved. Try the same thing as before, but rather than clicking the OK button, switch to the Remotes tab and then switch back to the Variables tab and your temporary variables will be gone.
Posted By: gemeau50 Re: Variable don't unset - 03/01/08 03:36 PM
RoCk tx for your reply

I added this line to the script:
echo $chan $nick $eval($+(%,txt,$nick ),2)

and I found that when the Scripts Editor is open and the tab "Variables" is on top, temporary variables are not unset. As soon as you change tab the unsetting restarts.
Posted By: RoCk Re: Variable don't unset - 03/01/08 04:06 PM

Yes I see that now, the variable is not unset as long as the editor is open to the Variables tab, but is immediately unset when you switch to another tab or click OK or Cancel. Clicking the sort button doesn't effect it either way, it's still unset after switching tabs or clicking OK or cancel. I never realized this before.
Posted By: argv0 Re: Variable don't unset - 06/01/08 07:15 PM
mIRC will not dynamically update the contents of anything inside the scripts editor while it is open. This goes for the userlist, script files, and variables. It loads the contents once into memory and keeps that data until you close it.
© mIRC Discussion Forums