Updated from 4.5 to 4.10 but can't update my project?

Ahh!

So, I had a few months out from UE4 (last used it at patch 4.5.1

Recently I came back, liked a few of the updates and also wanted to try out some of the newer example BP/projects on the learn section.

So, I downloade 4.10.1. All went smoothly, although it required me to download Visual Studio 15 (I assume this is because I had code in my project at some point)

I then go on to convert the project, it get’s to the C++ compiling stage, and churns out an error (I did it as a copy, as the prompt suggest I should).

I’m assuming this is happening because It was a blueprint project, but for some weird reason I added code just to play around with it, without actually really knowing how to code. I didn’t code anything, but I did the ‘add code to project’ function. I’m starting to regret that as I think that’s why I can’t upgrade, and I can’t really code in C++ so I’d struggle anyway. Regardless, I’m getting an error and can’t upgrade my project, any help?

Here’s the error it churns out;

The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe nypdnew Development Win64 -project="C:/Users/Marcus/Documents/Unreal Projects/nypdnew 4.10/nypdnew.uproject" -rocket -editorrecompile -progress -noubtmakefiles -2015
@progress push 5%
Parsing headers for nypdnewEditor
  Running UnrealHeaderTool "C:/Users/Marcus/Documents/Unreal Projects/nypdnew 4.10/nypdnew.uproject" "C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Intermediate\Build\Win64\nypdnewEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
Reflection code generated for nypdnewEditor in 5.1870494 seconds
@progress pop
Performing 8 actions (4 in parallel)
[3/8] Resource nypdnew.rc
[2/8] Resource ModuleVersionResource.rc.inl
PCH.nypdnew.h.cpp
MyObject.cpp
nypdnew.generated.cpp
MyCharacter.cpp
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyObject.cpp(7): error C2143: syntax error: missing ')' before '('
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyObject.cpp(7): error C2206: 'UMyObject::{ctor}': typedef cannot be used for function definition
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyObject.cpp(7): error C2059: syntax error: '&'
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyObject.cpp(7): error C2059: syntax error: ')'
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyObject.cpp(8): error C2065: 'PCIP': undeclared identifier
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyObject.cpp(8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyObject.cpp(9): error C2448: 'Super': function-style initializer appears to be a function definition
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyCharacter.cpp(7): error C2143: syntax error: missing ')' before '('
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyCharacter.cpp(7): error C2206: 'AMyCharacter::{ctor}': typedef cannot be used for function definition
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyCharacter.cpp(7): error C2059: syntax error: '&'
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyCharacter.cpp(7): error C2059: syntax error: ')'
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyCharacter.cpp(8): error C2065: 'PCIP': undeclared identifier
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyCharacter.cpp(8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Source\nypdnew\MyCharacter.cpp(9): error C2448: 'Super': function-style initializer appears to be a function definition
nypdnew.cpp
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: C:\Users\Marcus\Documents\Unreal Projects\nypdnew 4.10\Binaries\Win64\UE4Editor-nypdnew.dll
Total build time: 33.65 seconds

Hey MarkyUK-

There have been changes to the format of some of the code structure since 4.5. Looking at the error reports I can say off hand that the “PCIP” style for constructor declaration has been removed and instead you will want to use FObjectInitializer& ObjectInitializer. If there are any other compile errors can you post the code in the classes you’ve added?

Cheers

Hi ,

Thanks for replying.

I appreciate your help, however I think it’d be a lot easier for me to remove the code entirely from my project (again, as I said I haven’t touched it and was merely testing to see what it looked like).

Is there a simple way to remove the code I’ve added, and go back to JUST using blueprints? That’s what I’d prefer to do as I don’t understand code, and would much prefer to use BP’s!

Hopefully that way, there shouldn’t then be a problem updating as there won’t be any code?

Thanks!

Hey MarkyUK-

It is possible to remove the class from the project by going into the project directory’s Source/[project]/ folder and deleting the .cpp and .h files. You would then need to go back to the project directory root and right-click on the .uproject and select the Generate Visual Studio project files option to update VS with the removed class.

Note that this will remove the class from the project but will not change the project back to a blueprint project. It would still be considered a code based project, just with little actual code in the project.