Exit script if...

Hi!

I am looking for a solution to abort a script if a variable is empty.

:if ([:len $net1] = 0) do={
exit
}
...rest of the script should not be executed if $net1 empty

This does not work. Can you give me a hint on how to solve this?

Thank you
Stril

Maybe this could help:

:if ([:len $net1] > 0) do={
do what I want
}

/quit

try reverse condition

:if ([:len $net1]!=0) do={
execute
}

That closes the terminal connection…

I’d suggest

:error "bye!"