Unreal crs

Hey so myself and another programmer are having an issue with C++ in Unreal 4 using Version 17.2. So the issue is when we include other Uclass scripts and use objects of that type then try to compile the engine crashes. Then it crashes every time you try to open the project after that. The crash log isn’t showing me any hints as to why this is happening and so I have turned to the forums to see if anyone may have some insight.

this photo is mostly to show the includes and make sure nothing to messed up in this step, but when this was added by itself there were no issues

This is where the issue happens. When the UWeapon lines are removed from the code the project compiles fine, but I’m not sure why this is giving us any issues.

If anyone has a thought on what might be going on or has experienced this issue I would appreciate the help. I haven’t done a whole lot of complex code in C++ using Unreal 4 so assume that basic steps may have been missed.

Thank you in advance

UWeapon should be UWeapon* for starters, same for UArmor. You don’t want an instance of an object, you want a pointer to it. What you’ve done there makes no sense.

Additionally, you want to avoid using CPP types like ‘int’ Use int32 or other UE-specific types.

Thank you I appreciate it, like I said I haven’t really done anything in c++ for Unreal specifically so I’m still going to need to learn the UE specific types but thank you so much I really appreciate it