I’m on a school project to create an actor using code. I will link the exact step-by-step tutorial I was given by the school to show how simple this should be. I have also done this assignment before, but a few weeks later something went corrupt or something and my entire project just… stopped. I can open it, but when I opened it today to compare code, the original project that worked when I did this and actually had no errors in any of the files I had to work on with this assignment somehow had over 700 errors in it. The point is that something fell apart and it was easier for me to just restart the entire thing. That said, this was incredibly simple code and should work, but Visual Studio seems to be complete trash. Without altering my code at all, just commenting out a line, then removing the comment //, putting the line back into code, 20 errors were cleared up, going from 24 to 4. Attached are screenshots of my code:
I’ve been trying to fix ■■■■, including cleaning the solution and the project as a whole and building it again, and now I have even more errors without actually touching the code. The thing that strikes me the most is that like 6 of the errors are saying that I don’t have permissions to do what Im trying to do, which may be the problem for all of this. I tried running Visual Studio as an admin and it did literally nothing. I’m also getting one of my #includes, the #include MyActor.generated.h, as saying that can’t be opened now, and that was generated by the program itself. On top of that, I’m getting errors that the UObject is incomplete or something. Attached are more screenshots of the issues.
I generated the solution from the uproject again, like you suggested, and the headers are able to be opened and thus the MyActor.h and MyActor.cpp arent returning any errors anymore! Unfortunately, I have another problem, there’s a file that was generated by Unreal, Restarted_PaintballCharacter.cpp (my project is called Restarted_Paintball) that’s throwing back 6 errors, though I can’t find any actual error lines in the code itself. The error codes seem to be saying there’s an exception in the VR setup, something my professor emailed me about an hour ago when he was looking at the project himself. I didn’t add any VR functionality to my game, and I don’t need this character file at all for my projects, would it be safe to simply delete the cpp and the header of this generated file? Attached is a screenshot of the errors.
Edit: As I was about to post this I noticed that the error said the location is in the Restarted_PaintballCharacter.cpp.obj Currently I cannot get into the obj file, Visual Studio is having trouble trying to load the drop down menu for the Character.cpp