mIRC Home    About    Download    Register    News    Help

Print Thread
#217260 06/01/10 10:47 AM
Joined: Jan 2010
Posts: 5
P
Plinfut Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2010
Posts: 5
Hello everyone,

I have a weird problem with one of my scripts. This is the piece that is not working like I want it to:
Code:
alias scrHelpEn { /printHelp $true en }
alias -l printHelp { <some code> }

When I call scrHelpEn I get the error "PRINTHELP Unknown command". If I remove the -l switch it is working properly, so I didn't make any typos in the name and the alias itself is working properly. But as soon as I specify the -l switch, it becomes invisible to scrHelpEn while both are in the same script. :S

To make it even more interesting: I used the exact same structure (only a different name for scrHelpEn and different content of printHelp) in another script where it is working properly even with the -l switch. Although local aliases shouldn't interfere with each other, I figured that might be a problem anyway. But even when the script above is the only one loaded, it only works without the -l switch.

I would really like to make this alias local, but I don't see what goes wrong here. I would be very grateful if anyone can tell me what I did wrong (probably some tiny thing I'm just overlooking).

Regards,
Plinfut

Plinfut #217262 06/01/10 11:20 AM
Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
hi
i just tryed

Code:
alias scrHelpEn { /printHelp $true en }
alias -l printHelp { echo -a $1 ; $2 }


it's working!!


WorldDMT
chacha #217263 06/01/10 11:24 AM
Joined: Jan 2010
Posts: 5
P
Plinfut Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2010
Posts: 5
Now I'm really lost. For me it's still not working.
Time for another approach: comment out the rest of the script and see if works then. If so, add the other features again one by one and see if something else messes it up, although I can't imagine what the problem could be if it works without the switch.

Edit: I tried it, but even this doesn't work...
Code:
alias scrHelpEn { /printHelp $true en }
alias -l printHelp { echo -a $1 ; $2 }

While in another file, this does work:
Code:
alias helpEn { /printHelp $true en }
alias helpNl { /printHelp $true nl }
alias -l printHelp { <snip> }

I am really out of ideas here smirk

Last edited by Plinfut; 06/01/10 11:31 AM.
Plinfut #217267 06/01/10 12:54 PM
Joined: Jan 2010
Posts: 5
P
Plinfut Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2010
Posts: 5
Wow, I found the problem. I have no idea how it happened, but somehow the same alias ended up being defined in the alias section as well and there printHelp was not defined. After removing it there, mirc used the alias from the remove script section and everything works correctly.

Thanks to everyone who thought about a solution.


Link Copied to Clipboard