Hello, I’m not quite familiar with C++.
I’m trying to implement basic structures for my strategy game and I’m getting this error.
The command ““C:\Program Files\Epic Games\UE_5.2\Engine\Build\BatchFiles\Build.bat” … -WaitMutex -FromMsBuild” exited with code 6.
my code:
StrategyStateManager.h
Hey, your code snippets are a little unreadable due to the formatting.
Wrap the code between 3 backticks (3 at the start and 3 at the end, it’s the key to the left of the 1 key on the top row of numbers) and it’ll format it so it’s readable.
Make sure you’ve spelt class names correctly or not using the incorrect operator for something. If you check your Output Log in Visual Studio (or whatever IDE you’re using), there might be another issue that’s caught before this.
interesting… after disabling live coding i have 3 erorrs:
C1083 Cannot open include file: ‘StrategyStateData.h’: No such file or directory C:\Users\Admin\Documents\Unreal Projects\ctest\Source\ctest\StrategyStateManager.cpp
C2511|‘UStrategyStateData::UStrategyStateData(void)’: overloaded member function not found in ‘UStrategyStateData’|ctest|C:\Users\Admin\Documents\Unreal Projects\ctest\Source\ctest\UStrategyStateData.cpp
and the old one
MSB3073|The command C:\Program Files\Epic Games\UE_5.2\Engine\Build\BatchFiles\Build.bat ctestEditor Win64 Development -Project=C:\Users\Admin\Documents\Unreal Projects\ctest\ctest.uproject -WaitMutex -FromMsBuild exited with code 6.|ctest|C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets|44||
This error is a common thing, and it’s not a real issue.
It happens because you try to recompile your project via Visual Studio, while Editor is already running.
This will indeed not happen, if you haven’t used the Live Coding, but in this case you would have to reset the Editor every time after making any code change.
Instead, you should actually use the Live Coding feature to re-compile any code change.
You can do this by pressing this button (bottom-right corner of screen):