Problem Transferring Project 4.7-4.9

I had the same problem with 4.8 too. It says there is a problem in the visual studio part or something like that, here is what it said:

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

Running C:/Program Files/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe FPSProjectEditor Development Win64 -project="C:/Users/Greg/Documents/Unreal Projects/Paintball 4.9/Paintball.uproject" -rocket -editorrecompile -progress -noubtmakefiles
@progress push 5%
Parsing headers for FPSProjectEditor
  Running UnrealHeaderTool "C:/Users/Greg/Documents/Unreal Projects/Paintball 4.9/Paintball.uproject" "C:\Users\Greg\Documents\Unreal Projects\Paintball 4.9\Intermediate\Build\Win64\FPSProjectEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
Reflection code generated for FPSProjectEditor in 13.950592 seconds
@progress pop
Performing 8 actions (4 in parallel)
[3/8] Resource FPSProject.rc
[2/8] Resource ModuleVersionResource.rc.inl
PCH.FPSProject.h.cpp
FPSGameMode.cpp
FPSCharacter.cpp
FPSProject.cpp
FPSProject.generated.cpp
C:\Users\Greg\Documents\Unreal Projects\Paintball 4.9\Source\FPSProject\FPSGameMode.cpp(6) : error C2447: '{' : missing function header (old-style formal list?)
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: C:\Users\Greg\Documents\Unreal Projects\Paintball 4.9\Binaries\Win64\UE4Editor-FPSProject.dll
Total build time: 97.42 seconds

Hope this can be fixed, Thanks!

Says “open with visual studio” button too

Hey -

Just to clarify, you are receiving this message when you try to convert a project from 4.7 to 4.9? Are you attempting to open the project through the project browser and opening a copy or are you right clicking on the .uproject and choosing the Switch Unreal Engine version option?

Based on the message you posted it appears that an open brace “{” is missing from one of the files in your project (FPSGameMode.cpp).

Cheers

Also how will I open the project after i fix it, do i just run the project or what?

The open a copy option for the version transfer you mentioned.

Does the project compile inside Visual Studio? If there are errors in the code you can fix the errors and then build the project. After building you should then be able to open the project’s .uproject file.

Sorry I know 0% coding or Visual Studio (i like blueprint based games) So could you please guide me.

(Zoom In)

Hey -

Based on the screenshot this appears to be more of a generic compile issue rather than specifically related to changing the engine version for the project. Let me know if you can create a new project in 4.7 and convert the project from 4.7 to 4.8 and then to 4.9. If you’re still having problems with your original project you will have to fix any compile errors and then try to convert the project.

Yes i was able to update a default project from 4.7-4.8-4.9

Also i don’t even know how to fix compiler errors

The function inside the curly braces in your screenshot does not indicate what the actual function is. Considering the “Super::StartPlay()” line it appears the missing line outside the open curly brace would be void FPSGameMode::StartPlay().

So like this? And would you mind looking at the errors it shows from the building?

Going back to your first screenshot, if you add a space between the last include statement and the open curly brace, you would add void AFPSGameMOde::StartPlay() in that space.

So i get rid of what i just did?

The first line inside the curly brace is the only difference I see between the two screenshots. From a syntax standpoint, the first screenshot is closer to what is required to compile correctly. Changing that line back to what it was in the first screenshot and adding the line of code I provided in my previous comment should fix the issue you’re having.

I seem to have gotten a slightly different error:

Hey -

Let me know if you’re project compiles if you replace what you have in your screenshot with the following:

    #include "FPSProject.h"
    #include "FPSGameMode.h"
    #include "Engine.h"
    
void AFPSGameMode::StartPlay()
{
    Super::StartPlay();
    StartMatch();
    if(GEngine)
    {
         GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("HELLO WORLD"));
    }
}

This is what i have:

Does the project compile for you if you remove the code from your GameMode class? Can you send a zipped copy of the project for me to take a look at?