mIRC Homepage
Posted By: SladeKraven Error handling - 23/05/05 05:08 PM
Just a minor suggestion regarding the error handling of mIRC, sometimes when I've had a bit too much to drink or feeling generally fatigued I seem to add invalid parameters in Token Identifiers, but what I propose I think should work the same way the other identifiers.

Example of $numtok()

Correct:
//echo -a $numtok(Hello Andy it's a fine day today!,32)

Incorrect:
//echo -a $numtok(Hello Andy it's a fine day today!,32,0)

As you can see I deliberately added an extra parameter (0) to get the error. Now what I propose is this, instead of the error returned:

* Too many parameters: $numtok

I think it should say what it says in the help file.

* Too many parameters: $numtok(text,C)

As I said this should be the same with all the other identifiers, which would save time hunting through the help file when it's returned there and then.

I hope I was clear.

-Andy
Posted By: Riamus2 Re: Error handling - 23/05/05 05:14 PM
Could be useful, but some of those commands/identifiers have a LOT of options to them... it would give very long error messages for some of them. smile

Still, I like the idea.
Posted By: DaveC Re: Error handling - 24/05/05 08:10 AM
What about....

* Too many drinks, Andy's parameters have become blured: $numtok(uggghhhhh my head,C)

* Sorry couldnt resist

PS: nice idea, did you mean an actual error mesage showing the faulty spot in the parameter, or just a display of the corerect format for it?
Posted By: SladeKraven Re: Error handling - 24/05/05 12:32 PM
Heh, nice humour Dave.. laugh

Well I thought it might be too much hassle showing the faulty parameter, so I thought showing the valid parameters from the help file. Not too sure how showing the faulty parameter would go down (how we'd mIRC would show the faulty message.

Maybe the faulty parameter in red or something?

That is why I thought having it show the data like what it shows in the help file

-
* Too many parameters: $numtok(text,C)
-


Thanks for your input.. smile

-Andy
© mIRC Discussion Forums