Originally Posted By: Wims
What about making them returns the plain text $error value which is used in some cases in mIRC, because scripts already check for $null value and they all (from my own experience) assume the user canceled the dialog, which is a fair assumption imo, not sure if $sfile/$sdir could return $null to mean anything different in the past.


$error documentation suggests it is only filled when a formal error is raised and you go to :error and is reset by /reseterror. That does not mean that we should not use $error, just that we have to be careful that this won't break scripts that check whether $error is $null later on. IMO if we are going to use $error, then we should do it properly and raise the error and look for :error. So long as this is documented, then the script writer can handle it in the alias they use for $sdir $sfile or move their code into a separate alias in order to achieve this - and we can document this in WikiChip.

But this is still more complex than returning a special value. If $null is already used (when cancelling the dialog) how about returning $false instead?

Last edited by Protopia; 14/11/17 10:30 AM.