mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

I saw that when an duplicate /goto is into an code and i have the :error inside it does not goto :error but return an error message, here the wrong think is that it should goto into the :error because it is an scripting error and it should fill the $error too, take an example to reproduce it.

Example code:

Code:
alias dtest {
  echo -a ONE
  :next
  echo -a TWO
  :next
  echo -a THREE
  return
  :error
  echo 4 -a ERROR: $nopath($script) $scriptline $error
  reseterror
}


Error Message: * /goto: duplicate 'next' found (line 20, test.mrc)

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Code:
alias dtest {
  goto 1
  return
  :error
  echo 4 -a ERROR: $nopath($script) $scriptline $error
  reseterror
  goto end
  :1
  echo -a ONE
  :next
  echo -a TWO
  :next
  echo -a THREE
  :end
  echo -a End
}

Returns:
Code:
ONE
TWO
ERROR: remote.ini 54 * /goto: duplicate 'next' found (line 51, remote.ini)
* /goto: duplicate 'next' found (line 56, remote.ini)

and line 51: goto 1
line 56: goto end


Dont give a fish - teach to fish!

Link Copied to Clipboard