Expected a ')' in Atomic.h?

I had two errors prior to this lecture. Following the lecture I solved one of them regarding a missing #include. Simple enough I included the information so that VS understands what I’m doing. However the other error doesn’t make any sense to me. It’s saying that it’s expecting a ‘)’ in Atomic.h? Opening up Atomic.h this is the line it complains about:

(Line 188).

Should I be worried about this and what the hell is the problem even?

Edit: Wow I had a draft open and this got posted in the wrong section, and now it doesn’t let me delete it. Apologies…Also the lecture I’m referring to is “Include what you use in 4.17+”.

I have this exact same issue. Is it important, or what in the world is it for? When I went to replace the ‘?’ with an ‘)’ it said that it wasn’t even writable!!!

It doesn’t affect my compile though. It’s just an annoying error in the Error list. Please help.

Also, don’t try and replace the ‘?’ with a ‘)’, it messes everything up.

@Rob, do you know how to fix this?

Hi,

Unreal/C++ isn’t my thing I’m afraid, so, your best bet would be really to post this course related query on the Q&A and have one of the student instructors respond.

That said, what details does Visual Studio give you when you hover the mouse over that underlined question mark?

One thing you could consider is comparing your code to that in the GitHub repository for the course. If you click on Resources on Udemy and then for each lecture you should see a “Project Changes” link, that will take you to the specific commit for that part of the course.

On a related note, posting screenshots of code is not very useful, linking off to them elsewhere is even worse.
They are usually quite difficult to view, especially on mobile devices and, should someone offer to help you prevent them from being able to copy/paste a part of your code back to you with a suggestion/correction, this means they’ll have to type it all out - which might mean they don’t respond. Please copy/paste your code into your posts and then just apply the code formatting characters before and after.


See also;

Further to my reply earlier, I’ve searched on the Udemy Q&A and there appears to be a solution already for this issue;

Hope this helps :slight_smile:

@Rob Thank you so much for your help! I’ll let you know what Visual Studio says when I hover over it soon.

With the Project Changes, this is an error that is not a change. The weirdest part is that it just happened. I had never edited the Atomic.h before in the time that I’ve had Visual Studio.

If it makes a difference, it happened after I updated to 4.21.

I’m sorry for the inconvenience of screenshots, as I have done that before with my code. Thank you for making me aware of this issue!

As of the other link that you sent me, it is the same issue. However, I could not for the life of me find the solution! I’ll look at it more closely later, and tell you if I’ve found the solution. Also, with the different questions that I’ve looked at, they all seem to be recent, so it very might well be a 4.21 issue. If anyone else has this issue, then it would be very helpful if you could post your Unreal engine and Visual Studio version number.

One more thing,

Where is the “course related query on the Q&A”? Is in in this GameDev site under a specific category (if so, which?)? Or is it on the Udemy Q&A section?

Again, Rob, I cannot express my gratitude for helping me. Thank you so much, I really appreciate your willingness to help.

Hey Caleb,

You’re welcome although I don’t think I’ve really helped you that much.

What I was suggesting was that you can compare your code exactly to what the course has, perhaps you already have?

That may well be your issue, if you are using a different version to that which the course was created using/recommends you may well get different behaviour, although this is a bit odd.

I was actually referring to the original poster with that, although as you’ve confessed to doing the same hopefully it is handy to know why it can be difficult. Generally speaking, people are lazy - so if you want people to help you, make it easy for them. If they have to click on links to see images, download files, virus scan anything, squint to read code, or type anything, you’re making it harder for them :wink:

I assumed that link would take you straight to the question on the Q&A that I found that had some information, my apologies if it didn’t. If you browse to the course, click on the Dashboard link so that you are not in a specific section, then click on the Q&A option in the middle at the top. From here, in the search box type “atomic.h”, you should see what I sent you the link for 3 questions from the top;

image

Ok, so if you have queries relating to the course, where you want a response from an instructor/student instructor, the Q&A on Udemy is the best place to post that. The instructors do not frequent the forum very often so you are unlikely to get a response from anyone other than fellow students. This can, of course, also be incredibly useful, if they know the answer, but if you waiting and waiting then the Q&A on Udemy would be the place to post. The Q&A has a limited number of features unfortunately, but you can add a code block to your posts there so that at least the code is a bit easier to read too.

You’re very welcome although I’d be happier if I could actually give you a definitive solution. I think you are probably right with regards to the version of Unreal, if there are any changes to the supported version of C++ perhaps which are different between versions then that could be a factor. You see this in Unity/C# from time to time where someone will inadvertantly place one method within another and they’ll see an error about nested functions not being supported in that version of C#, the later versions actually support it, although that isn’t ideal in this situation as they typically don’t realise they’ve nested a function in the first place. My point being the different version of the language may create these differences.

Can you have multiple installations of Unreal at anyone time? e.g. can you install the older version which the course uses and then copy your project and open it in that - if possible you may see different results. Just a thought.

Go to yourProjectName.Build.cs in Visual Studio, on line 11, after InputCore, add “ApplicationCore”, with the quotation marks. The line should look like this unless if you had already modified it before:

Keep in mind I had already tried this myself, and the whole reason I made this post is because it didn’t work. Maybe it was Visual Studio acting up, because now that I’ve tried it again it worked and took the error away.

Try that and see how it goes.

1 Like

@Denis_Delinger where exactly is this ProjectName.Build.cs? Like where in the project folder?

Alright, I just found it. I literally searched for ProjectName.Build.cs, so that didn’t work :grin:

Adding the line didn’t work, is there anything that I have to do special? Like, what did you do to get it running?

Also @Rob, the question that you linked me to had this exact same solution, I just didn’t see it at first glance. :grin: Also, as to the multiple versions, if this doesn’t work, I will try that, as you can have as many engine versions installed as you want.

1 Like

The weirdest thing is happening. If I go to the BattleTank.Build.cs and build with the “Application Core” added it has no errors. However, when I click out of that tab the errors pop back up. Here is what my code line looks like on line 11: PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "ApplicationCore" });

Privacy & Terms