<aside> 🎶 This is part of a ongoing series called Building A Music Engine

It documents the process of me smashing my head against the keyboard to build a game called LETSGO

It’s gotten long enough to break into several sections:

<aside> 😇 Note from the future:

This article comes as a live debugging session trying to debug impenetrable Unreal C++ errors.

One of those poorly documented Unreal things that you just have to learn through osmosis and **PAIN

This document is me smashing my head against the keyboard for 2 weeks trying to figure it out.**

If you don’t want to see the process in which a man falls completely apart only to randomly stumble on the solution, you can skip to the next part here:

Building the Drum Machine

</aside>

It’s day 7 of trying to make a working get/set method in Unreal C++.

These are the kind of thoughts you find yourself having:

*To have the ALetsGoGameMode have working get/set method accessors for the UQuartzClockHandle I attempted to set the reference of MainClock as a TWeakObjectPtr.

This satisifies Rider- no squiggly lines in the Editor.

Compile/Build fails with:*

------ Building 11 action(s) started ------
  [1/11] Compile [x64] SharedPCH.Engine.Cpp20.InclOrderUnreal5_0.cpp
  [2/11] Compile [x64] LETSGO.init.gen.cpp
  [3/11] Compile [x64] LetsGoGameMode.cpp
  [4/11] Compile [x64] ULetsGoMusicEngine.cpp
  [5/11] Compile [x64] LETSGO.cpp
  [6/11] Compile [x64] LetsGoGameMode.gen.cpp
  [7/11] Compile [x64] ULetsGoMusicEngine.gen.cpp
  [8/11] Compile [x64] MainClock.gen.cpp
  [9/11] Compile [x64] LetsGoGameState.gen.cpp
  [10/11] Compile [x64] LetsGoGameState.cpp
  Projects\\LETSGO\\Source\\LETSGO\\GameModes\\LetsGoGameState.cpp(14): error C2440: 'delete': cannot convert from 'TWeakObjectPtr<UQuartzClockHandle,FWeakObjectPtr>' to 'void*'
  Projects\\LETSGO\\Source\\LETSGO\\GameModes\\LetsGoGameState.cpp(14): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
  [11/11] Compile [x64] MainClock.cpp
  Total time in Parallel executor: 74.35 seconds
  Total execution time: 84.68 seconds
Build failed.

Translating Garbage Words

The error:

Cannot convert from TWeakObjectPtr<UQuartzClockHandle,FWeakObjectPtr> to void*'