# UBTFunctionLibrary::SetBlackboardValueAsObject() (failed: OwnerComp != nullptr)

**URL:** <https://forums.unrealengine.com/t/ubtfunctionlibrary-setblackboardvalueasobject-failed-ownercomp-nullptr/1308043>\
**Category:** AI\
**Tags:** behavior-tree-task, unreal-engine, CPP, question\
**Created:** [September 22, 2023, 4:45pm UTC](https://forums.unrealengine.com/t/ubtfunctionlibrary-setblackboardvalueasobject-failed-ownercomp-nullptr/1308043 "2023-09-22T16:45:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [September 22, 2023, 4:45pm UTC](https://forums.unrealengine.com/t/ubtfunctionlibrary-setblackboardvalueasobject-failed-ownercomp-nullptr/1308043/1 "2023-09-22T16:45:14Z")

</div>

I have a problem setting the node owner in this function.

`UBTFunctionLibrary::SetBlackboardValueAsObject(this, Base, Actor);`

I got this error:

 ![Sin título](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/3/ef32fa4054b35e9c10cb1ee8c884594614dbfe7c.png)

My class is like this:

```auto
class UBTT_GetTeamReference : public UBTTask_BlackboardBase

```

The node owner is not the “this” pointer for this case?  
What is the right param then?

Thank you so much!!

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [September 22, 2023, 11:52pm UTC](https://forums.unrealengine.com/t/ubtfunctionlibrary-setblackboardvalueasobject-failed-ownercomp-nullptr/1308043/2 "2023-09-22T23:52:23Z")

</div>

Ok, the UBTFunctionLibrary class is a very poorly done job (No offense intended).

Fortunately you can see the code and the solution to the problem.

 ![0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/c/42cbae8be4a02018cc61ae9ccde801219065d0c1.png)

The solution is not to use the UBTFunctionLibrary class.

And use the class member (FBlackboardKeySelector::SelectedKeyName) instead.

Every day I find a new bug… it’s amazing.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 22, 2023, 11:52pm UTC](https://forums.unrealengine.com/t/ubtfunctionlibrary-setblackboardvalueasobject-failed-ownercomp-nullptr/1308043/3 "2023-10-22T23:52:37Z")

</div>

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