Exit Action block without updating Output variables in case of error

Dm114

Well-known member
For some reason, some Action block configure parameters sometimes disapear (set to Not used). It can be very damageable mainly when mandatory Input parameters disappear. For example, an Action block to sort arrays needs an input array variable to be sorted and returns an output sorted array variable which replaces the original one in the calling macro.

The problem happens when, for some reason, the name of the input array disappears. In this case, the output array variable returns an empty array which replaces the unsorted original one.

Even when testing input array size to zero in Action block and executing either Exit action block or Cancel macro actions, the execution stops but output variables are updated with their original default values.

Wouldn't it be possible to assign 2 different functions to Exit action block and Cancel macro actions in Action blocks? For instance:
- "Exit..." could imply full update of output variables with the calculated values so far
- "Cancel..." would stop Action block execution without making any update (as if Action block weren't called)
 

Endercraft

Moderator (& bug finder :D)
I got this bug too, I made a bug report because my macro wasn't working and @MacroDroidDev said it was because the input variable was empty. I'm not sure why, especially if you copy and paste in the same macro with same variables..
 

Dm114

Well-known member
I got this bug too, I made a bug report because my macro wasn't working and @MacroDroidDev said it was because the input variable was empty. I'm not sure why, especially if you copy and paste in the same macro with same variables..
Unfortunately it doesn't happen only when input and output variable(s) in the calling macro are the same. It seems to have something to deal with modifying Action block but I can't reproduce this bug for sure. It's the reason why I didn't report it yet though it's an old issue.

But my purpose, here, is to find a mean to cancel the Action block execution with no update in the calling macro: it could be useful in some other cases.
 
Top