...terminated with exit code: 1

Ever since making this project I’ve been getting this in Unreal:

Now I’m getting build errors that look similar to things others sound to be getting but most of this is still Greek to me so I was hoping for some insight. Since they were suggestions I saw in other posts I’ve:

  • Modified my VS22 install (10.1.6) to include the “Individual Component” .NET Framework 4.6.2 SDK

  • I tried to “Generate Visual Studio Project Files” by right clicking ObjectAssault in explorer

  • I even tried Deleting the Binaries , Intermediate , and Saved folders before doing that

But regardless I end up with this exit code: 1
Frankly, I’d love it if any of this even made any sense. I thought we were editing C++ but its asking me to consider updating .json files?? Can you shed some light on how I got myself this screwed up before we even did any coding?!

The string is missing the terminator: '.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

Hmm, those look like some weird errors. The only thing that I could think of that happened is that the files are corrupted.

1 Like

The first screenshot is unlikely to be related to any coding error.

The second screenshot is just IntelliSense errors and IntelliSense is given data via the compileCommands.json which gives the command for how each file was compiled so with that knowledge it would be able to provide the autocomplete and syntax highlighting.
Whenever you add new files that doesn’t automatically add that to the compileCommand.json for some dumb reason so you have to manually do Tools > Refresh VS Code project each time.

Your third screenshot says there’s a missing quote terminator for a string e.g '. instead of '.'

1 Like

Okay, there may have been a corrupted file? I opened the folder it was complaining about and there was no file. I asked Unreal to duplicate A and then name it B but it had a problem doing the rename.

So I copied version A and called it the version B it was looking for (in explorer since Unreal didn’t like this idea).

This just changed the error to a material error so I opened the asset and hooked it up to material A. Problem is now gone.

Second, that Refresh VS Code seems to have done the trick. No more .json errors.

Third, I still get the parser error and terminate with exit code 1. It looks to dislike this line:
#include "MovingPlatform.h"
… but isn’t it fine? I haven’t even touched anything yet!

Could it possibly be complaining about the apostrophe in the file path?
I tried renaming this folder. Unreal launcher now forgot all previously built games and I had to launch the project from explorer. VS code still gives me the same error but is not recognizing that the file path is different. Oh, but you said Refresh every time…

Okay, great! But what other side effects am I going to hit now that I changed the directory? My ObstacleAssault project is still in there but all the other clutter of things I’ve experimented with are gone.

Is this even a problem? What about the code editors I just installed? Is there anything I need to update there?

Well, I’ll take this as C++ mocking me and move on because I certainly expect shenanigans ahead.

Just to make sure I didn’t miss anything. You’re all sorted now, right?

1 Like

I think so. Thanks for your help with Refresh VS Code! I moved on and haven’t issue. It seems surprising that an apostrophe in a file folder name is enough to screw it up but it seems that was it. How do I retarget Unreal’s launcher to the folder after I change its name?

Try adding the path to your project folder to GameUserSettings.ini located under C:\Users\<your user name>\AppData\Local\EpicGamesLauncher\Saved\Config\Windows\GameUserSettings.ini.

Inside GameUserSettings.ini, find the [Launcher] section (usually at the top) and add the following:
CreatedProjectPaths=<path to your project folder>. You can add as many as you like.

For example, here’s what mine looks like:

DefaultAppInstallLocation=C:\Program Files\Epic Games
1 Like

Yep, that was the final piece of the puzzle. I had to exit Unreal Launcher entirely but I feel foolish that I didn’t consider that at first. Now I have my library of projects back and no weird build errors.
Thank you all for the group effort! Now we need to teach the forum to accept multiple solution posts.

Maybe I spoke too soon…

I think I created this other problem…