3dRaven, the code you shared is different from Bssnake. See Bssnake uses "" (in the end of lines) that allows declaring a macro on multiple lines of a source file.
@Bssnake, your code doesn’t compile because it is not supposed to work. The issue in code lies in the improper use of Unreal Engine’s reflection system macros and how the Unreal Header Tool (UHT) processes them.
Reflection Macros are different from C++ Preprocessor Macros. UHT scans for these reflection macros to generate crucial boilerplate code for Unreal’s reflection system and object-processing systems BEFORE the C++ preprocessor does his job. So, nothing under “#define” is expanded at the moment of UHT work.
So, these macros only function correctly when they are directly present in the source code, as UHT does not expand or interpret custom preprocessor macros.
In other words, when UHT process such a code it does not evaluate or expand macros:
It has no knowledge of what DEFINE_USTRUCT means because the macro expansion is handled later by the C++ preprocessor, which UHT does not interact with