Code not compiling at all

Hello there, it would appear that my code is not compiling at all when working on the Bulls and cows game. I don’t know what happened but it appears that for some reason unreal doesn’t compile the code anymore even when I remove the PrintLine function which I thought was the issue but it doesn’t even compile the BeginPlay function. Things I’ve tried:

  • Tried to remove the BullCow Cartilage and re-attach it.

  • Googled the error I get to see if anyone has any answers about it.

  • Looked at previous posts about the issue, but however, it appears none of them have had an issue like this one.

  • Tried to disable and renable extensions in VSC just in case it might be one of them.

Here’s is what my code looks like and a full project log:


Message log

Code

Also worth noting that it no longer autofills the correct function.

Project Log

[2021.12.10-00.05.03:849][ 66]Launching UnrealBuildTool... [C:/Program Files/Epic Games/UE_4.27/Engine/Binaries/DotNET/UnrealBuildTool.exe  -ModuleWithSuffix=BullCowGame,7972 BullCowGameEditor Win64 Development -Project="C:/BullsandCows/BullCowGame-starter-kit/BullCowGame.uproject" "C:/BullsandCows/BullCowGame-starter-kit/BullCowGame.uproject"  -IgnoreJunk]
[2021.12.10-00.05.03:851][ 66]Warning: Starting HotReload took  0.4s.
[2021.12.10-00.07.01:255][232]CompilerResultsLog: New page: Compilation - 10 Dec 2021, 00:07:00
[2021.12.10-00.07.01:274][232]CompilerResultsLog: Creating makefile for BullCowGameEditor (no existing makefile)
[2021.12.10-00.07.01:274][232]CompilerResultsLog: Parsing headers for BullCowGameEditor
[2021.12.10-00.07.01:274][232]CompilerResultsLog:   Running UnrealHeaderTool "C:\BullsandCows\BullCowGame-starter-kit\BullCowGame.uproject" "C:\BullsandCows\BullCowGame-starter-kit\Intermediate\Build\Win64\BullCowGameEditor\Development\BullCowGameEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\Dilla\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed
[2021.12.10-00.07.01:274][232]CompilerResultsLog: LogInit: Display: Loading text-based GConfig....
[2021.12.10-00.07.01:274][232]CompilerResultsLog: Error: C:/BullsandCows/BullCowGame-starter-kit/Source/BullCowGame/BullCowCartridge.h(23)  : Error: '0': Bad command or expression
[2021.12.10-00.07.01:296][232]LogMainFrame: MainFrame: Module compiling took 117.736 seconds
[2021.12.10-00.07.01:724][232]Warning: HotReload failed, recompile failed
[2021.12.10-00.07.17:521][830]LogSlate: Took 0.070822 seconds to synchronously load lazily loaded font '../../../Engine/Content/Slate/Fonts/DroidSansMono.ttf' (77K)

The Log says The error is in the Header File/Line 23, but you havent attached that.

Try to find out if you find an error there. If you cannot find it come back here and show us the content of the .h File.

1 Like

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

Privacy & Terms