# Agent ToString not working

**URL:** <https://forums.unrealengine.com/t/agent-tostring-not-working/1798348>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 11, 2024, 7:15am UTC](https://forums.unrealengine.com/t/agent-tostring-not-working/1798348 "2024-04-11T07:15:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![najmm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@najmm](https://forums.unrealengine.com/u/najmm)\
**Post date:** [April 11, 2024, 7:15am UTC](https://forums.unrealengine.com/t/agent-tostring-not-working/1798348/1 "2024-04-11T07:15:48Z")

</div>

Can anyone explain why I need to do this weirdness:

```auto
# weirdness
GetAgentName<public><localizes>(Agent:agent):message = "{Agent}"
GetAgentNameString<public>(Agent:agent):string = Localize(GetAgentName(Agent))

```

Ideally I’d just like to call `Print(Agent)` but it doesn’t work and throws an error. Same goes for `Print("{Agent}")` which also throws an error.  
Right now, I’m defining the above two functions and then calling `Print(GetAgentNameAsString(Agent))` which works.
