Macro Error

Hi,

So, I was busy with this project and basically copied this entire blueprint into another one. They both have the same variables, because they inherited this from their parent.

However, for the blueprint I copied to did not work, saying that certain nodes were not compatible with each other. I did not see the error at first, but later I saw it appear in this macro. For the blueprint I copied from it was just fine.
Not much later unreal crashed and this error is found everywhere in all projects.

I tried verifying, reinstalling, removing the macro file and replacing it with that of someone else, but nothing seems to work.

I would really appreciate help on this!

Have you tried simply deleting the “GET” node and making a new “GET”. Sometimes depending on what was connected to the “GET” previously if you don’t actually delete it and create a new one variables will be incompatible. It is annoying but a problem I have noticed when switching variables and using the same “GET” nodes, they don’t update unless you delete them and re-create them.

Thank you for your answer, but I am afraid it only helps for one blueprint. I replaced it and it seems to work for one blueprint, but it fails for the other blueprint which is exactly the same. If I replace that one after, it causes an error for the first blueprint again.

If that helps but not completely I think you have a corrupted macro for whatever reason. I suggest you delete this macro entirely and rebuild it from scratch. I know that seems like a pain but trust me better to do that now and see if that fixes the issue than try and troubleshoot a corrupted file. If that still doesn’t work take some screen shots of the macro in both blueprints where you are calling it and we will try and figure something out from there.

also that looks like the standard “for each loop” macro, did you duplicate that macro before messing around with it or did you modify the original macro in unreals standard library?

It is the standard ‘For Each Loop’ macro. I must admit, I replaced the get node at first, but later I changed it back. The error still occurs, though.

Now I reverted it back with a source control program. It did not seem like the problem was there anymore; the for each loops worked again. Later, however, I tried the same thing and got a few errors beforehand, saying some connections had suddenly become ‘incompatible’. I replaced them with the same nodes and it seemed to be gone as well.

However, I tried to rebuild the blueprint and the ‘get’ node error appeared again. It did not give any compiler errors until I copied the nodes to another blueprint. Then it happened only to that blueprint where it was copied to again. When restarting Unreal, the error occurred for both.

I will try rebuilding the Macro for now and I will let you know if it worked. If not, you will see the screenshots soon.

Hmm that’s weird. For the future though I would advise against directly editing the actual macro in the Unreal library. I would copy/ paste their macro setup into a new custom macro library blueprint and modify your personal macro instead of the engine default. This way if something goes wrong you can just delete your macro. If source control fixes the issue and you don’t get the errors until you modify the macro again I would revert to the last state with the default macro functioning and copy it’s nodes or better yet recreate them yourself in a custom macro as stated above then try calling your custom macro and see if you get errors

I had not changed the macro the second time, after reverting the files with source control, but it still gave the error. Besides, I had changed the macro because the error occured. It seemed like copying the blueprint into another one caused it, but I don’t know exactly how. I will try to recreate the macro as you advised, though.

Not really sure if it would be of use for getting a better view of the problem, but when someone else opens the project it gives the exact same error and I did not submit the macro change to the source control program.

Apparently my comment did not go through. Well in a nutshell what I said was I have had weird bugs like this that seem to be rouges. They come out of nowhere and make 0 sense. I have had BPs working fine, I change nothing one day they just don’t work. I duplicate them and the duplicate works fine. Other times I have had to rebuild the entire BP same exact nodes, just nothing copy/pasted and it works again. If it’s not too much effort, try reverting to the last point where everyone working on this project had functioning macros and then I would attempt to rebuild the custom macro from scratch not going anywhere near the Unreal default macro except to reference its nodes to build your custom one. Other than that, I really dunno what else to do to help…sorry. Maybe someone else in the community knows what might be the issue?

Thank you very much for your help! I managed to solve the issue. For some reason the ‘For Each Loop’ was only for a certain class and even though I filtered that class only from ‘BoxOverlapActors’, it would be sort of incompatible, because the Out Actors are all ‘Actors’ instead of the filtered class. It is a very strange error, but adding a ‘Cast To (class)’ seemed to work as it removed the error from the ‘get’ node in the macro loop.