Weird Macro Bug - Direction Mismatch Between Pins

So I’m getting this strange BP compiler error. I have a function that compiles with no error, but when I condense a chunk of it into a macro two of the select nodes throw the error “direction mismatch between pins.”

  1. Function with no macro - no error
  2. Function with macro - error!
  3. Error in macro

It works as a separate (pure) function instead of a macro. I guess it makes more sense to be a function anyway; you wouldn’t write such a long macro in C++.