Code is broken, yet working fine?

Once I got to the point of adding a new header file to include an array of hidden words, something broke in my code and now I’m getting errors all over the place. I removed the new header, but I’m still getting these errors. From what I can tell, the errors all seem to be related to the BullCowCartridge.h header, almost like it’s not being accessed properly.
My autocomplete is now broken, new lines of code don’t seem to get color-coded anymore, and it’s hard to tell when I have an actual error. Speaking of which, the code works just fine! It compiles without issue, the game runs as intended, in every way it appears to work but the program seems to think everything is in chaos.

Here’s an example of the errors:
(Note: there are plenty more than shown (notice the 36 listed errors), this is just a snippet)

I also get this one single error in the header file as well, from code that was part of the original BullCow asset pack, so I know this line works; I’m not even the one that wrote it:

Any help would be much appreciated!

Quickest fix I got for this was to go inside Unreal File->Refresh VS Code. Also, in the cpp file, check if you’re including the BullCowCartridge.h. You’ll notice unreal can act up a lot sometimes and the best thing to do is restart and save often.

I can confirm I did include BullCowCartridge.h, and I’ve refreshed several times to no avail.

If the code is working you can ignore the squiggles. You can press the lightbulb icon that appears next to the number of the line and select ignore errors. You shouldn’t worry much about VS errors since your code is working.

Well, whatever has caused this issue has also broken my color-coding and my auto-complete. If need be, I’ll tell it to ignore the errors, but I’d prefer to fix the issue rather than mask it.

You can browse for add-ons and/or settings. I had the same issue, but I can’t remember what was that made it work. Honestly, I did a lot of things and probably all of them made it. I think it might have been this one https://code.visualstudio.com/docs/cpp/config-mingw

I’ll give that a shot and hopefully it works.

Sadly, this did not work either.

Have you updated to 4.26.1? That should have IntelliSense fixed. After updating refresh the workspace by using File > Refresh Code Project

I did not, I’m still on 4.26.0; I didn’t realize a new version had been released. However, the problem seems to have fixed itself. Pulling up Visual Studio Code, I immediately got hit with some messages about “downloading and installing” and suddenly, I had a new version of Code. And apparently, that’s all that it needed; Visual Studio Code just needed to update itself.
Thank you so much for the suggestion though, I appreciate it!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms