mIRC Home    About    Download    Register    News    Help

Print Thread
$lscriptline #123574 25/06/05 06:41 AM
Joined: Sep 2003
Posts: 149
S
Stealth Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Sep 2003
Posts: 149
I would like something that returns the last script line, that can be used with Goto and in aliases called by scripts. It should return the line that put you where you are now, like:
Code:
somealias {
  command
  goto next
  :next
  return $lscriptline
}

That would return 3, because the GoTo command is on line 3.

An example with callin aliases:
Code:
somealias {
  someotheralias
}

someotheralias {
  return $lscriptline
}

This would return 2, because someotheralias was called on line 2.


mIRC 6.21 - Win XP Pro (SP2) - 2.4 Ghz - 1 GB Mem
irc.x-tab.org
Re: $lscriptline #123575 25/06/05 08:13 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I assume its ment to return the line of the last executed command.
Can you give me an idea of something we could use this type of indentifier for?
I cant think of a usefull reason for it or for the existing $scriptline identifier, (besides debugging)

Last edited by DaveC; 25/06/05 08:14 AM.
Re: $lscriptline #123576 25/06/05 05:42 PM
Joined: Sep 2003
Posts: 149
S
Stealth Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Sep 2003
Posts: 149
This is somewhat useful for debugging. In my script, most of my events and aliases have the :error goto thingy, and I would like to consolodate then into 1 alias to save some space in my files. I think $lscriptline would help provide a little more information than the current error handling does.


mIRC 6.21 - Win XP Pro (SP2) - 2.4 Ghz - 1 GB Mem
irc.x-tab.org
Re: $lscriptline #123577 25/06/05 11:45 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
A fair an understandable need, I have some scripts that do the same thing, I currently keep a VAR %zone value updated based on what section its in, this is only ever used in the error handler to tell me the zone something failed in, a by far inperfect solution.