mIRC Home    About    Download    Register    News    Help

Print Thread
#192523 03/01/08 01:07 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
OP Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
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


Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

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.

Joined: Dec 2002
Posts: 145
G
Vogon poet
OP Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
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.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

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.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard