Visual Studio Problem or...?

Hello

For some reason when I try to build this code it gives me 22 errors like it does not seem to want to recognize anything in it, I don’t know C++ or visual studio I just learning unreal and I just need my bullets to not delete itself on physical objects so I deleted the code that does that and it won’t allow me to build

Any help?

Image:

EDIT UPDATE:

Ok so still no luck with the help below like i say im learning unreal just was just a small step to comment out delete at the bottom but does not seem to want to work.

It looks like the Error List ‘File’ column says that these are in the header file (.h). Look there for syntax errors or post the image of that and maybe we can help. The header file is ‘AN3074179AATProjectProjectile.h’

Try to return to the point where you didn’t have any errors (clean project), and then add line by line with compiling. On a good compilation lasts for 10 seconds, so it’s not very long. That’s how I was learning how to program without any advanced programming environment (just highlighting keywords). Also, if you don’t feel strong in C++ I highly recommend using blueprints.

Sorry i have been using blueprints and following a video tutorial, basically he said comment out delete and press build i have not touched the code other than that but it won’t let me build … hmmmm i will just try reinstall visual studio ill update soon

Hey CBMP-

The code that you commented / removed may be necessary for other parts of the code to compile successfully. If you add back in the edited code (a clean project as Ch3shireCate mentioned) does it still fail to compile? Additionally, the red line under your include statement likely means that it’s unable to find the header file you’re trying to include. Let me know if using Runtime/Engine/Classes/GameFramework/ProjectileMovementComponent.h inside the quotes instead has any affect. If you’re still getting compile errors, please post the full error list and/or output log to help identify exactly what is failing compile.

Cheers

Please post a screenshot of the errors you get when compiling.

Thanks tried what you said but no luck i loaded up another file save and it has no errors but has no option to build so i have no idea.

Looking at the full list of errors, there appears to be issues in the projectile.h file as well. Specifically, the line that says "Cannot open source file “GameFramework/Actor.h” seems to imply that there is a problem with the include statement. Can you post a screenshot of the header file (.h) as well?

Thanks do you mean this one? :open_mouth:

You figure anything out? :0

Can you explain how you’re creating this class? I created a new class in the editor based on Actor and added code so the class looked identical to yours and did not receive the compile errors shown. Additionally, if you’re removing the code for the OnHit() function, you may also want to delete the “AddDynamic” line (line 13 of your first screenshot) as well as the OnHit declaration from your .h file (lines 23&24 of your last screenshot).