# Live coding error

**URL:** <https://forums.unrealengine.com/t/live-coding-error/749921>\
**Category:** C++\
**Tags:** bug, unreal-engine\
**Created:** [January 15, 2023, 4:50pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921 "2023-01-15T16:50:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pelaculi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pelaculi](https://forums.unrealengine.com/u/Pelaculi)\
**Post date:** [January 15, 2023, 4:50pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/1 "2023-01-15T16:50:41Z")

</div>

Hi, i am coding in ue but when i try to compile it gives me an unspecified error, it just says "Patch could not be activated at the end of compilation without errors or warnings.  
I cannot figure out why, but i think it has something to do with the compiler c# files, so i’ll write them here  
Note that this project is still pretty small, i just started it.

attritionEditor.Target.cs

```auto
using UnrealBuildTool;
using System.Collections.Generic;

public class attritionEditorTarget : TargetRules
{
	public attritionEditorTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Editor;
		DefaultBuildSettings = BuildSettingsVersion.V2;
		IncludeOrderVersion = EngineIncludeOrderVersion.Latest;

		ExtraModuleNames.AddRange(new string[] { "attrition" });
	}
}

```

attrition.Target.cs

```auto
using UnrealBuildTool;
using System.Collections.Generic;

public class attritionTarget : TargetRules
{
	public attritionTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		DefaultBuildSettings = BuildSettingsVersion.V2;
		IncludeOrderVersion = EngineIncludeOrderVersion.Latest;

		ExtraModuleNames.AddRange(new string[] { "attrition" });
	}
}

```

attrition.Build.cs

```auto
using UnrealBuildTool;

public class attrition : ModuleRules
{
	public attrition(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicIncludePaths.AddRange(
			new string[] {
				"attrition"
			}
		);

		PrivateIncludePaths.AddRange(
			new string[] {
			}
		);

		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "ModularGameplay" });

		DynamicallyLoadedModuleNames.AddRange(
			new string[] {
			}
		);

		// Generate compile errors if using DrawDebug functions in test/shipping builds.
		PublicDefinitions.Add("SHIPPING_DRAW_DEBUG_ERROR=1");
	}
}

```

Thanks in advance

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [January 15, 2023, 5:15pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/2 "2023-01-15T17:15:23Z")

</div>

Hi Pelaculi,

Try compiling from Visual Studio with your project closed first to see if you still get any errors.

If you do, they should be in the VS compiler log…

---

<div class="post-metadata">

**Author:** ![Pelaculi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pelaculi](https://forums.unrealengine.com/u/Pelaculi)\
**Post date:** [January 15, 2023, 7:08pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/3 "2023-01-15T19:08:54Z")

</div>

It works w/o unreal??

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [January 15, 2023, 7:15pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/4 "2023-01-15T19:15:43Z")

</div>

There is a “.sln” file in the same folder as your project - that’s the Visual Studio project file which you can double click to open in Visual Studio (without your project open in UE).

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/4/b74b53d05eb6a2c5df239036f893da0b2e0fc387.png)

You can build that without unreal running, and when you execute it - the Unreal Editor will start up with your project loaded.

---

<div class="post-metadata">

**Author:** ![Pelaculi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pelaculi](https://forums.unrealengine.com/u/Pelaculi)\
**Post date:** [January 15, 2023, 7:51pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/5 "2023-01-15T19:51:48Z")

</div>

when i try to start up after the compilation is says

> The game module ‘attrition’ could not be loaded. There may be an operating system error, the module may not be properly set up, or a plugin which hash been included into the build has not been turned on

What do i do now?

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [January 15, 2023, 7:59pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/6 "2023-01-15T19:59:42Z")

</div>

There’s a good post here about that (isgoed’s answer):

> [@Unable to load Module](https://forums.unrealengine.com/t/unable-to-load-module/330343/3):
>
> So when you get the error: “The game module ‘MyGame’ could not be loaded. There may be an operating system error or the module may not be properly set up.” Means that there is a Windows DLL load error. (If you are not at windows, it is OS specific, but you need to figure it out yourself). When you open your project in visual studio, you can pause the the debugger when the dialog appears. Unfortunately, this code is in core-Unreal, but luckily you can download the debug symbols as described he…

---

<div class="post-metadata">

**Author:** ![Pelaculi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pelaculi](https://forums.unrealengine.com/u/Pelaculi)\
**Post date:** [January 15, 2023, 8:45pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/7 "2023-01-15T20:45:04Z")

</div>

i did all the passages there, but there was no error when i switched to development editor and when i open the debug output it shows nothing

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [January 15, 2023, 9:02pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/8 "2023-01-15T21:02:05Z")

</div>

You mention your project is still small - perhaps it would be easiest to start a new project and slowly add your code over to the new project?

---

<div class="post-metadata">

**Author:** ![TheRealThouZands](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheRealThouZands](https://forums.unrealengine.com/u/TheRealThouZands)\
**Post date:** [January 17, 2024, 11:43pm UTC](https://forums.unrealengine.com/t/live-coding-error/749921/9 "2024-01-17T23:43:54Z")

</div>

not sure if it will be useful for @Pelaculi still, but i will still post it; this error can be caused too by using a plugin in the code BUT NOT enabling it in the editor (i.e. the data in the uproject file, if it’s not convenient to open unreal editor up, you can open that file in visual studio); as the same error after VS build states, “or a plugin which has been included into the build has not been turned on”

the error @Pelaculi shown at the beggining explains that everything built without mistakes, but the patch couldn’t be linked because some metadata was lacking, obviously this is not verbose, but the metadata is just that, the inclusion of the plugin in the project “header”, i.e. the .uproject file.
