mIRC Home    About    Download    Register    News    Help

Print Thread
#111757 18/02/05 10:27 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
It seems mIRC has trouble working with $& if it's in the middle of an /if statement, here's an example section of a script that it bugs on:

Code:
if ($left(%window,1) == @) && (!$window(%window)) && (%x isnum 0-) && (%y isnum 0-) && (%width isnum 0-) && (%height isnum 0-) { $&
      window $+(-d,$iif(%desktop == $true,h),k,$iif(%ontop == $true,o),pB) $+(+d,$iif(%desktop != $true,L)) %window %x %y %width %height }


The above gives the following error, but only if part of the condition is $false:

Quote:
* /if: open bracket not found (line 273, GUI.mrc)


As you can see, it clearly has a matching amount of ( and ).

I'm using $& a lot to keep the horizontal scrollbar from showing so I can edit the code without having to scroll.

Edit:

Here's two aliases that anyone can use to see if it happens to them:

Code:
alias testing {
  if ($false) { $&
    echo -a bug }
}
alias testing2 {
  if ($true) { $&
    echo -a bug }
}


/testing gives the /if error, /testing2 echo's "bug".

Edit 2: mIRC 6.16, XP Pro (No SP2)

Last edited by tidy_trax; 18/02/05 10:36 PM.
Joined: Jan 2005
Posts: 44
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 44
perhaps put the bracket after the $& as a temp solution. But you're right it does look like a bug, since you only get it on $false.

Code:
alias testing2 {

  if ($true) $&

    {  echo -a bug }

}

alias testing {

  if ($false) $&

    {  echo -a bug }

}
 


edit: although as you know, you can already split lines after a bracket without the need for $&

Code:
alias testing2 {

  if ($true)  {

  echo -a bug }

}

alias testing {

  if ($false)  {

  echo -a bug }

}

Last edited by Splatted; 19/02/05 01:46 AM.
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I use $& for consistency throughout the code, it appears a lot. wink


New username: hixxy

Link Copied to Clipboard