mIRC Home    About    Download    Register    News    Help

Print Thread
#266578 29/12/19 07:07 AM
Joined: Dec 2019
Posts: 20
S
Stephen Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2019
Posts: 20
What would cause variables to no longer set on any level? I have tried blowing away vars.ini to a new file but anytime I try to set any variable I do not see it in the vars tab of script editor.


Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
The most common reason for this is that one of your scripts has an incorrect number of { or } and this is causing the /set command to be overridden. To track it down, you would need to unload your scripts one at a time, use the /set command in the status window and then check the variables section. If the variable is set as expected, you have narrowed the issue down to a particular script. You would then need to load the script and check the aliases defined in it to narrow the cause of the issue.

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
One possible cause could be accidentally creating an alias for the /set command.

If you have a line beginning with /set somewhere in your alt+D aliases file, that makes it intercept the /set command and perform that alias instead.

To see if that has happened, paste this into any editbox:

Code
//echo -a $isalias(set) $isalias(set).fname


If it says $true, then that's where the alias is located. If it says $false, then that's not the problem.

If the /set command works when it's inside a script, but not when typed in the editbox, another possibility could be an ON INPUT event which doesn't correctly handle editbox commands beginning with the forward slash.

Joined: Dec 2019
Posts: 20
S
Stephen Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2019
Posts: 20
well while I was waiting for the reply I started unloading ini's and loading one at a time.
I came up with this this as the culprit. An alias I had started but had to stop to take care of something else. There is of course a broken bracket at the bottom. It was for a hangman script that I was trying to change to allow for spaces to be shown for a couple of word handman word.

/hangit {
set %broken.appear $str(-,$len(%broken.word))
set %broken.appear2{
if
}
var %l = 1
while (( %l <= $len(%broken.word) )) {
set $+(%,broken.letter.,%l) $leftind(%broken.word,%l)
set $+(%,broken.appear.,%l) -
inc %l
}
echo 4 %broken.appear
}

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Yes, by having that { bracket touching the 2, it no longer is a special symbol, so the } below the "if" line is closing out the alias.

This causes the next line "var %l = 1" to be the definition for an alias. I suspect you also have trouble with the 'while' command being redefined by the remainder of that line.


Link Copied to Clipboard