Updated macros in script.h to avoid unfreed error struct