HiddenWord isn't declared as a variable

HiddenWord after FString isn’t declared and “cake” doesn’t reprint in the game terminal.

(*Edit: Moving forward with the other modules, Bull Cows works fine and recognizes “cake” as a win\lose variable. I’ll keep exploring.)

What is VS Code thinking is an error in BullCowCartridge.h?

Here are my errors.

See here #include issues

Allright! Thanks for the help.

It fixed my HiddenWord issue and BullCowCartridge.h

Now I have many more squiggly lines but I guess those aren’t to be bothered with just yet?

Game works fine.

If it compiles fine then you can ignore that. You may just need to refresh the code project via File > Refresh Code Project in Unreal.

Copy the defines just in case doing that erases them.

Ok. This has create a new set of problems.
I pasted the defines found on the Udmy .9 discussion (Unreal 4.25VS Intellisense bug) . It temporarely resolved the HiddenWord issue, until I moved on to lecture .51 (Member variables). Then it all went wrong and doesn’t compile anymore.

And here is my message log. (lines are too long to screengrab properly).

Creating makefile for BullCowGameEditor (no existing makefile)
Building BullCowGameEditor…
Using Visual Studio 2019 14.26.28806 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.26.28801) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Upgrade]
[Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
[Upgrade] bLegacyPublicIncludePaths = false => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
[Upgrade] ShadowVariableWarningLevel = WarningLevel.Error => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
[Upgrade] PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs).
[Upgrade] Suppress this message by setting ‘DefaultBuildSettings = BuildSettingsVersion.V2;’ in BullCowGameEditor.Target.cs, and explicitly overriding settings that differ from the new defaults.
[Upgrade]
Building 4 actions with 8 processes…
[1/4] BullCowCartridge.cpp
D:\Onedrive\UNREAL\Udemy\BullCow Game\BullCowGame-starter-kit\Source\BullCowGame\BullCowCartridge.cpp(11) : error C2143: syntax error: missing ‘;’ before ‘}’

When I copy paste FString HiddenWord into the header file, it loses any recognition and is not initialised in any way.

You’re missing a semicolon on line 10.

Hi Dan,
I’m back after a short hiatus.

I added the missing semi-colon.
I added the defines and updated the path.
Yet, I still can’t compile BullCowGame.

The compiler log says the following :

Creating makefile for BullCowGameEditor (no existing makefile)
Parsing headers for BullCowGameEditor
Running UnrealHeaderTool “D:\Unreal projects\BullCowGame\BullCowGame.uproject” “D:\Unreal projects\BullCowGame\Intermediate\Build\Win64\BullCowGameEditor\Development\BullCowGameEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\User\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed

D:/Unreal projects/BullCowGame/Source/BullCowGame/BullCowCartridge.h(10) : Error: Missing ‘{’ in ‘Class’

And my .cpp terminal looks like this

I’m looking around the to find how to add the : missing ’ { ’ in ‘Class’ (as mentioned in the last line of my compiler log) but I see no cut and dry answer.

Here is my .h terminal:

Is this an Unreal 4.25 issue?

Thanks for your time.

If you have a semicolon on line 10 in your header which shouldn’t be there.

SUCCESS!

Ok. I’ll look over how and what all that entailed to get a better grasp of C++.

I’ll get better at this.

Thanks for your help @DanM

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

Privacy & Terms