Hi,
I am writing/testing a script on 3beta7 and I have some problems with conditions. Probably it is the same on 2.9.xx version train.
I am using ‘/xx’ find or ‘:find’ and I need to handle the cases when nothing is found. Sometimes it seems the command returns ‘nil’ sometimes it returns ‘nothing’. It seems the result differs if the command is started from command line or from script. It seems there are difference when using conants or variables.
I am using now probably something like:
:if ([:typeof [:find “aa” “bb”]] != num) do={:put “Not found”}
to do something if the substring doesn’t exist but it is somewhat unclear and unreadable. I hope there is a better way how to write the condition? Maybe I am missing something important…
Thanks