mIRC Home    About    Download    Register    News    Help

Print Thread
#79724 17/04/04 11:48 PM
Joined: Mar 2004
Posts: 33
M
Mc_Fly Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2004
Posts: 33
Maybe this bug is already posted on this forum but error goto (...)

Code:
alias test {
  if (0) {
    :1
    echo > 1
  }
  goto 1
}

and i have in my status window
Code:
-
* /goto: '1' not found (line 7, script3.ini)
-


In fact, the goto command search the :1 label, but this label is in /if in the top. Goto can't find the label, in this script, it will freez.

An other code:
Code:
alias test {
  goto 1
  if (0) {
    :1
    echo > 1
  }
}

And i get "> 1" in the status window.
Here, goto have found the label in /if command, in down of his.
(sorry for my english)

#79725 18/04/04 10:33 AM
Joined: Nov 2003
Posts: 157
Vogon poet
Offline
Vogon poet
Joined: Nov 2003
Posts: 157
I think that it is a nonsense...

alias test {
if (0) {
:1
echo > 1
}
goto 1
}

Try with this

alias test {
:1
if (0) {
echo > 1
}
goto 1
}
because goto, check before the if, ok? grin

#79726 18/04/04 09:20 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Strictly speaking, from other languages, /goto is supposed to jump to any spot in the script with no restriction. But then again, this *is* only mIRC Script.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#79727 19/04/04 12:25 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
It seems to be that mIRC won't find the label since it doesn't parse the commands inside the /if if it doesn't have to, however it will find a label even if it hasn't reached that point in the alias and so hasn't parsed that label yet. It all seems too inconsistent to be intentional.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard