I'm fairly certain I understood you just fine,

Originally Posted By: westor
when the $did from the /echo is 0 then i get an error message that i should NOT get


This assertion is incorrect. You should get an error message, because 0 is a reserved value, making $did(0) an invalid ID. The error message is appropriate and is clearly intentional (as evidenced by an explicit error message that says the ID is invalid). It sounds like perhaps you are the one who did not read my explanation fully? I explained why this is a reasonable behavior in my first response.

mIRC returning an error message for a parameter it deems invalid is itself not a bug. If mIRC decided that $did(FOO) (the literal text FOO) should return an error, this too would not be a bug, since it's an intentional choice by design. In this case, mIRC intentionally disallows the use of 0 as a parameter to $did, and it's your script's responsibility not to pass this parameter in using some if-guard.

Incidentally, there is good reason for mIRC to disallow 0 as a parameter that refers to an individual control, since in all other collection based identifiers that take an ordinal parameter, an N=0 input returns the size of the collection. It would be inconsistent for $did(0) to return something other than a count, so it may just be a reserved value for future use-- that would be my guess, anyway.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"