# Build from source fails with errors C4834 and MSB3073

**URL:** <https://forums.unrealengine.com/t/build-from-source-fails-with-errors-c4834-and-msb3073/1266696>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, question\
**Created:** [August 20, 2023, 1:50pm UTC](https://forums.unrealengine.com/t/build-from-source-fails-with-errors-c4834-and-msb3073/1266696 "2023-08-20T13:50:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![alexkondratenko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alexkondratenko](https://forums.unrealengine.com/u/alexkondratenko)\
**Post date:** [August 24, 2023, 7:29am UTC](https://forums.unrealengine.com/t/build-from-source-fails-with-errors-c4834-and-msb3073/1266696/4 "2023-08-24T07:29:49Z")

</div>

Hi @ptitbgdu80 and @Anonymous_c0b2ef1d8b6296d661f82020eeaf73de,  
Removing line 513 is not really a solution to the problem.

This is a bug in the UE code on line 513.  
It should probably be:

```auto
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("Unable to find Action [%s] for Action Set [%s]"), *ActionName.ToString(), *ActionSet.ToString()));

```

instead of:

```auto
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, (TEXT("Unable to find Action [%s] for Action Set [%s]"), *ActionName.ToString(), *ActionSet.ToString()));

```

Actually the problem is in the substring:

```auto
(TEXT("Unable to find Action [%s] for Action Set [%s]"), *ActionName.ToString(), *ActionSet.ToString())

```

This line is like:

```auto
const TCHAR *value = (TEXT("some value"), name1.CalculateString(), name2.CalculateString());

```

or

```auto
auto a = (op1(), op2(), op3());

```

the results of calling op1 and op2 will be ignored, but only op3() will be assigned to a.  
So, if op1 or op2 has a “nodiscard” attribute, Visual Studio will generate an error/warning.  
The previous version of Visual Studio did not have this behavior. New Visual Studio update - has.

The actual nodiscard attribute that can cause this error in this situation is UnrealString.h, line 324:

```auto
	/**
	 * Get pointer to the string
	 *
	 * @Return Pointer to Array of TCHAR if Num, otherwise the empty string
	 */
	UE_NODISCARD FORCEINLINE const TCHAR* operator*() const UE_LIFETIMEBOUND
	{
		return Data.Num() ? Data.GetData() : TEXT("");
	}

```

To sum up, the solution would be to use this line instead of line 513:

```auto
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("Unable to find Action [%s] for Action Set [%s]"), *ActionName.ToString(), *ActionSet.ToString()));

```

---

_[View the full topic](https://forums.unrealengine.com/t/build-from-source-fails-with-errors-c4834-and-msb3073/1266696)._
