# Does this work?

**URL:** <https://forums.unrealengine.com/t/does-this-work/1782657>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 1, 2024, 11:26pm UTC](https://forums.unrealengine.com/t/does-this-work/1782657 "2024-04-01T23:26:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nelmi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nelmi/32/746978_2.png) [@nelmi](https://forums.unrealengine.com/u/nelmi)\
**Post date:** [April 1, 2024, 11:26pm UTC](https://forums.unrealengine.com/t/does-this-work/1782657/1 "2024-04-01T23:26:16Z")

</div>

```auto
 if(mapString:=mapVotedFor[Player]?):
              #do stuff
          else:
            set votesForMap1 += 1
            UpdateUI() 

```

If the value in mapVotedFor[Player] is false (doesn’t exist) it runs what’s in else: right? Because that’s what I’m trying to do

---

<div class="post-metadata">

**Author:** ![PiEqualsThree3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PiEqualsThree3](https://forums.unrealengine.com/u/PiEqualsThree3)\
**Post date:** [April 1, 2024, 11:41pm UTC](https://forums.unrealengine.com/t/does-this-work/1782657/2 "2024-04-01T23:41:51Z")

</div>

Do it without the question mark

---

<div class="post-metadata">

**Author:** ![nelmi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nelmi/32/746978_2.png) [@nelmi](https://forums.unrealengine.com/u/nelmi)\
**Post date:** [April 2, 2024, 12:09am UTC](https://forums.unrealengine.com/t/does-this-work/1782657/3 "2024-04-02T00:09:06Z")

</div>

I supposed that’s gonna make it work but could you explain why? Cus Im pretty sure that when i put the ? it means that it returns false if no value is there

---

<div class="post-metadata">

**Author:** ![ok\_studios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ok\_studios](https://forums.unrealengine.com/u/ok_studios)\
**Post date:** [April 8, 2024, 4:47am UTC](https://forums.unrealengine.com/t/does-this-work/1782657/4 "2024-04-08T04:47:33Z")

</div>

Hi,  
If you call and it returns false, then it will fail. False = fail and jump to else. So no need to query it.  
If it returns with any value other than false, it will succeed, and code will proceed underneath the IF block.

---

<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:** [May 8, 2024, 4:47am UTC](https://forums.unrealengine.com/t/does-this-work/1782657/5 "2024-05-08T04:47:37Z")

</div>

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