Help with Blocks

Is there any way I can reduce the number of blocks here ?


This thing works perfect as of now but if I wish to increase the number of conditions It will become repetitive. The message shown by Notifier1.ShowAlert is different in each case.
Thanks in advance for help :wink:

you could reduce nesting depth by reversing the test logic, and adding elseif sockets to one ling if/then/elseif ...

if error1 then
complain about error1
elseif error2 then
complain about error2
elseif error3 then
complain about error3
...
else
finally do whatever he wanted

The down side to this is when your elseif voodoo doll stretches offscreen and you have to use scroll bars to drag the voodoo doll bubble up to reach the bottom of the sockets.

By the way, the test

  • if is number() = true
    is equivalent to
  • if is number()
1 Like

Thanks @ABG for your help , great method , I will use that unless someone else comes up with another method :smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.