This is a great idea and should be implemented as the "main" new feature in the next mIRC, just as SIGNALS or Multi Server were in the past in their respective version releases.

This could be very useful for any scripter, beginner to advanced. As a solution to not being able to sufficiently catch internel mIRC Errors, this script could be used to process a custom alias (such as echo) to do checks to see if it will error the internal /!echo once it is called, and if it will error, then to echo an appropriate error about the alias which called the custom alias (echo).

Example:
/alias test echo $1-
/alias echo !echo $1-
-
* Added 'test' alias
-
/test 8
-
* /echo: insufficient parameters (line 2, aliases.ini)
-
In this example, it errors where the internal echo is called, on line 2 of the aliases file, when it should error on line 1. This reveals nothing in the way of debugging a script, if the custom alias is used in several hundreds of places. With Raccoon's idea, the echo alias could be checked for proper syntax and if it did not have the proper syntax then to echo an error with the line that called that alias:

alias test echo $1-
alias echo {
if (PROPER SYNTAX CHECKS) { !echo $1- }
else { !echo -a / $+ $calias Insufficient parameters ($calias(-1).fname $+ , $calias(-1).ln) }
}

OFF TOPIC: As an extension to the "PROPER SYNTAX CHECKS" maybe an alias to check if calling an alias with certain parameters will return an error or not?

As for the virus detection idea, It is a very good use for this, although the $calias would need to support returning if the alias was called via DDE or a DLL I suppose.





Last edited by lordares; 08/05/03 11:12 PM.