# Convert logic to string

**URL:** <https://forums.unrealengine.com/t/convert-logic-to-string/790825>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite\
**Created:** [March 14, 2023, 7:30pm UTC](https://forums.unrealengine.com/t/convert-logic-to-string/790825 "2023-03-14T19:30:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [March 14, 2023, 7:30pm UTC](https://forums.unrealengine.com/t/convert-logic-to-string/790825/1 "2023-03-14T19:30:09Z")

</div>

I am debugging and trying to print some logic value on the screen.

But I have no idea how to print anything that is not of type string.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/c/b7ce7be95baea1e3c19674263070f6f4bf141823.png)

---

<div class="post-metadata">

**Author:** ![DustinREDGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dustinredgames/32/634988_2.png) [@DustinREDGames](https://forums.unrealengine.com/u/DustinREDGames)\
**Post date:** [March 14, 2023, 10:07pm UTC](https://forums.unrealengine.com/t/convert-logic-to-string/790825/2 "2023-03-14T22:07:23Z")

</div>

yeah no `ToString` for logic. +vote to adding this  
You have to do the less elegant way:

> ```
> if (Logicc = true):
> Logger.Print("true")
> else:
> Logger.Print("false")
> 
> ```

---

<div class="post-metadata">

**Author:** ![Conan\_Reis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/conan_reis/32/1016955_2.png) [@Conan\_Reis](https://forums.unrealengine.com/u/Conan_Reis)\
**Post date:** [March 18, 2023, 12:54am UTC](https://forums.unrealengine.com/t/convert-logic-to-string/790825/4 "2023-03-18T00:54:59Z")

</div>

Yes - it is a pain not having it.

Here is another variation of what you suggested:

```python
Logger.Print(if(Logicc?) {"true"} else {"false"})

```

In the future maybe we could add an extension function for `logic` 🤔 :

```python
Logger.Print(Logicc.ToString())

```

---

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [March 19, 2023, 10:54pm UTC](https://forums.unrealengine.com/t/convert-logic-to-string/790825/6 "2023-03-19T22:54:48Z")

</div>

I would love that addition 😍

---

<div class="post-metadata">

**Author:** ![little\_chunter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@little\_chunter](https://forums.unrealengine.com/u/little_chunter)\
**Post date:** [May 5, 2023, 5:03pm UTC](https://forums.unrealengine.com/t/convert-logic-to-string/790825/7 "2023-05-05T17:03:48Z")

</div>

I actually created a one-liner extension method for this yesterday. Seemed to work as expected. I added the `<computes>` so that it could be called from a failure context, but I’m still a little green in that area of verse, so maybe that’s not a good thing to do.

`(Logic : logic).ToString<public>()<computes> : []char = if (Logic?) then "true" else "false"`
