mIRC Home    About    Download    Register    News    Help

Topic Options
#217741 - 21/01/10 03:03 PM $scriptline bug
Knoeki Offline
Vogon poet

Registered: 28/01/09
Posts: 116
Loc: Amsterdam, The Netherlands
I'm suspecting there might be a bug in the identifier $scriptline.

It seems that, instead of working exclusively as '$scriptline', it also seems to work with.. well.. whatever you stick behind it. '$scriptlines25439' will still return the currently executing line in the script.

I'm not entirely sure if this is actually a bug, for all I know it might be a feature, and if it is, I appologize, but would also like to know the reason it works like this.

EDIT: Someone found out you're apparently not even allowed to start alias names with the word 'script' to begin with, although I haven't personally confirmed this.


Edited by Knoeki (21/01/10 03:08 PM)
_________________________
http://zowb.net

/server -m irc.p2p-network.net -j #zomgwtfbbq
(ssl on port 6697 and 7000)

Top
#217744 - 21/01/10 03:18 PM Re: $scriptline bug [Re: Knoeki]
Khaled Offline


Planetary brain

Registered: 04/12/02
Posts: 4441
Loc: London, UK
There are quite a few identifiers that behave that way. This is a legacy behaviour left over from when the parser was first designed. I have avoided fixing the behaviour for specific identifiers in case it breaks existing scripts, however newer identifiers are more strict.

Top
#217749 - 21/01/10 03:41 PM Re: $scriptline bug [Re: Knoeki]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
For example, while text appended to $scriptline will be ignored, text appended to the $N-identifiers will be used. This means aliases mustn't start with a number...
Unless you use: $/<identifier> (the /-prefix enforces the usage of the custom identifier) or $.<identifier>. This in turn means your aliases mustn't be named like prefixes: "/" "//" "/." or "." And of course they mustn't start with a "!". There's also "~" (this prefix prevents the "no such identifier" message - for default identifiers only). smile
However, aliases starting with the word "script" do work.

Code:
alias scripttest { echo -a $!scriptlineABC: $scriptlineABC $!1ABC: $1ABC }
/scripttest test

Top
#217752 - 21/01/10 04:13 PM Re: $scriptline bug [Re: Horstl]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3506
Loc: France
Quote:
There's also "~" (this prefix prevents the "no such identifier" message - for default identifiers only)
It's a side effect of what $~ really do : calling the builtin mIRC identifier or return $null


Edited by Wims (21/01/10 04:13 PM)
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#217753 - 21/01/10 04:42 PM Re: $scriptline bug [Re: Wims]
Knoeki Offline
Vogon poet

Registered: 28/01/09
Posts: 116
Loc: Amsterdam, The Netherlands
Thanks for the replies, it cleared up the issue for me :_)
_________________________
http://zowb.net

/server -m irc.p2p-network.net -j #zomgwtfbbq
(ssl on port 6697 and 7000)

Top