mIRC Home    About    Download    Register    News    Help

Print Thread
#217741 21/01/10 03:03 PM
Joined: Jan 2009
Posts: 116
Knoeki Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jan 2009
Posts: 116
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.

Last 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)
Knoeki #217744 21/01/10 03:18 PM
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.

Knoeki #217749 21/01/10 03:41 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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

Horstl #217752 21/01/10 04:13 PM
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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

Last edited by Wims; 21/01/10 04:13 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #217753 21/01/10 04:42 PM
Joined: Jan 2009
Posts: 116
Knoeki Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jan 2009
Posts: 116
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)

Link Copied to Clipboard