|
Joined: Jan 2008
Posts: 57
Babel fish
|
OP
Babel fish
Joined: Jan 2008
Posts: 57 |
Hi, I have one remote where I've created some aliases without -l parameter, and I'm trying to call it in other place but it won't work. alias k {
if $1 && $2 {
return $+($chr(3), $1, $2, $chr(3))
}
} So I use $k(4, text here) for coloring text instead of CTRL + K in everywhere. Also I have same $b(text here) which works fine, and so on for underline and italic. Am I wrong anywhere? EDIT: Also note that $b works fine everywhere.
Last edited by DeSync; 22/12/10 11:48 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
While it looks right to me, one option that I have come across is that mIRC is (sometimes) picky regarding spaces. Just a suggestion: alias k {
if $$1 isnum && $$2 {
return $+($chr(3),$$1,$$2-,$chr(3))
}
}
Another possibility I just thought of, is that you might need to evaluate the expression before returning it. If that's the case, use return $($+($chr(3),$$1,$$2-,$chr(3)),2) for your return line.
|
|
|
|
Joined: Jan 2008
Posts: 57
Babel fish
|
OP
Babel fish
Joined: Jan 2008
Posts: 57 |
No, it's same:
But it returns this at status: (7 is color number)
7 No such channel
And this:
* /echo: insufficient parameters (line 22, script.mrc)
line 22 is line where alias is called $k(7, text)
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
It seems to work fine the way you have it. Maybe you have more than one k alias? Try changing it to something that is guaranteed to be unique, such as kcolor or whatever. Changing the name of the alias may be all you need.
Edit: If you're getting no such channel, then it isn't your identifier that is the problem, but how you're using it. How are you calling it? $k(7, text) isn't how you're calling it... you'd need something else on that line (echo, msg, etc).
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jan 2008
Posts: 57
Babel fish
|
OP
Babel fish
Joined: Jan 2008
Posts: 57 |
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Have you tried naming it differently yet?
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jan 2008
Posts: 57
Babel fish
|
OP
Babel fish
Joined: Jan 2008
Posts: 57 |
Yeah, now works, but why won't if $k?
I'm sure that there's not other alias with same name.
|
|
|
|
Joined: Dec 2002
Posts: 2,029
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,029 |
Did you look aliases.ini? there is a default /k (/kick) alias.
That might explain the 7 No such channel error when you used echo -s $k(7, text)
|
|
|
|
Joined: Jan 2008
Posts: 57
Babel fish
|
OP
Babel fish
Joined: Jan 2008
Posts: 57 |
Ahh.. yeah, that was, but file aliases.ini wasn't loaded 
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
mIRC loads the Aliases.ini file by default every time it starts, unless you either unloaded it, or there's been a problem that has stopped it from loading. If you found the file by clicking the Aliases tab in the Remotes section, then the aliases.ini file was loaded.
|
|
|
|
Joined: Jan 2008
Posts: 57
Babel fish
|
OP
Babel fish
Joined: Jan 2008
Posts: 57 |
Aliases tab was empty, but there was aliases in aliases.ini file.
|
|
|
|
|