Posted By: KindOne
/setlayer sets 0 if not using a number. - 16/09/20 10:37 PM
I think this command should print an error instead of just blindly setting 0 if someone makes a typo.
//setlayer a | timer 1 5 setlayer 255
Posted By: Khaled
Re: /setlayer sets 0 if not using a number. - 18/09/20 12:01 PM
Thanks for your bug report. Technically, this is standard behaviour across the scripting language and in most features. While some commands and identifiers will report an error if you try to use text instead of a number, the majority will simply try to extract a number from the parameter that you provide. If it happens to be text, it will return zero.
Posted By: maroon
Re: /setlayer sets 0 if not using a number. - 18/09/20 11:49 PM
For this command, evaluating text as if 0 can make it difficult to get back into your client after this scripting error.
//var %setting 128 | !setlayer %setting $chan(1) | timer -o 1 10 !setlayer 255
If the 128 is deleted, the $null %variable causes the first setlayer command to be seen as "setlayer #channel" which is evaluated as if "setlayer 0" against the main window.