mIRC Home    About    Download    Register    News    Help

Print Thread
Funny behavior with script editor #226235 24/09/10 12:27 AM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Hello, thank you for your time. I just wanted to document that I experienced this funny behavior. I do not know that I could recreate it. I am using mIRC version 7.1 on Windows Vista Home Premium. I have never had this issue before.

I was working on code that translates incoming privmsg data to mirc /echo format. I was trying to support italics and was pressing ctrl + i in the script editor. It wasn't giving me a font box so I'm pretty sure I clicked cancel instead of saving it, but I am not 100% that I didn't save the file.

I restarted mIRC and my code to connect to the server wasn't working. I found out that I had a bracket mismatch in the file I had been working on. I narrowed it down to the code I just explained but couldn't find any bracket mismatch. I tried deleting brackets and typing them back in hoping there was an invisible character screwing something up but nothing worked.

So you know how mIRC script editor will justify the brackets, or show them as nested to make it less confusing to read? So the "bad bracket" should have been 1 step to the left (2 spaces) I used backspace to put it where it should have been and hit the bracket mismatch button and it fixed it.

Code:
  if (%no_) {
    if (!%hL_ [ $+ [ %pm_nk ] ]) && ($hget(soulfly,hL_sound)) {
      splay $qt($ifmatch)
      set -u5 %hL_ [ $+ [ %pm_nk ] ] $true
    }
    echo $3 $chr(160)
    }


Using backspace, I manually moved the last bracket to spaces to the left where it should be, hit the bracket mismatch button "{}" and it fixed it.

Code:
  if (%no_) {
    if (!%hL_ [ $+ [ %pm_nk ] ]) && ($hget(soulfly,hL_sound)) {
      splay $qt($ifmatch)
      set -u5 %hL_ [ $+ [ %pm_nk ] ] $true
    }
    echo $3 $chr(160)
  }


So the script editor was showing it as a bracket mismatch and made all following aliases nested in the if statement so the script wouldn't work. But, it appears that there wasn't a bracket mismatch.

Was there any work done on the script editor since version 6.35?

Re: Funny behavior with script editor [Re: DJ_Sol] #226236 24/09/10 01:05 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I can't reproduce this. You probably added italics characters to the editor, and, since they are invisible, you didn't see them and thought what you pasted was all you had in the script.. it wasn't. I'm sure once you remove them, it works fine. It certainly works fine here.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Funny behavior with script editor [Re: argv0] #226243 24/09/10 03:57 AM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Yeah, I'm guessing that somehow I got an invisible italics font code in front of the bracket and deleted it when I backspaced. Sorry about the bother.