# how to use 'HasAllItem' in verse for conditional button

**URL:** <https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [August 10, 2023, 8:35pm UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136 "2023-08-10T20:35:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LyssaSugarNya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lyssasugarnya/32/722321_2.png) [@LyssaSugarNya](https://forums.unrealengine.com/u/LyssaSugarNya)\
**Post date:** [August 10, 2023, 8:35pm UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136/1 "2023-08-10T20:35:00Z")

</div>

Hello, I’m really new to verse and coding in general.  
Today, I tried to use `HasAllItem` from conditional button, so that it can check if the player has the required item that is stored in the conditional button.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/d/59d5ee82df7f1cd235792cdbe628278b481a4961.png)  
But, I do not know how to use it… Whenever I try to check if the player has the key (the required material I put in conditional button), I get red squiggles.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/0/b804d129ecd6dc10c5625408749cf1e9048ca16a.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/c/4fc70b549f4287e773003ca9102d3f7598d63d1a.png)  
I would really appreciate it if somebody could help me!

---

<div class="post-metadata">

**Author:** ![MoSchmo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MoSchmo](https://forums.unrealengine.com/u/MoSchmo)\
**Post date:** [August 13, 2023, 7:21pm UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136/2 "2023-08-13T19:21:34Z")

</div>

Hello. I see two fixes that you could make to correct your issue.  
The first thing you need to do is a minor change to line 30:

> detect\_weapons(Agent: ?agent) : void =

The second issue is on line 31, where you you spell Subcibe, instead of Subscribe.

I hope that resolves your issue.

---

<div class="post-metadata">

**Author:** ![LyssaSugarNya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lyssasugarnya/32/722321_2.png) [@LyssaSugarNya](https://forums.unrealengine.com/u/LyssaSugarNya)\
**Post date:** [August 14, 2023, 7:21am UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136/3 "2023-08-14T07:21:34Z")

</div>

thank you sm I appreciate it

---

<div class="post-metadata">

**Author:** ![LyssaSugarNya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lyssasugarnya/32/722321_2.png) [@LyssaSugarNya](https://forums.unrealengine.com/u/LyssaSugarNya)\
**Post date:** [August 14, 2023, 5:07pm UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136/4 "2023-08-14T17:07:09Z")

</div>

sorry to trouble you again but even after I corrected the ‘subscribe’ spelling error, I still got red squiggles T-T.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/1/e1100f2f4c98424d53970c4211ec749a2c083c2c.png)

---

<div class="post-metadata">

**Author:** ![MoSchmo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MoSchmo](https://forums.unrealengine.com/u/MoSchmo)\
**Post date:** [August 14, 2023, 6:41pm UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136/5 "2023-08-14T18:41:47Z")

</div>

Hello again. I can see now, that you tried to use “Subscribe” incorrectly here. From my understanding, you are only allowed to use Subscribe on listenable events.

Below is a screenshot of events associated with he capture\_area\_device. Notice that they all end with \*\*Event

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/9/3798b37ad47db77990109c4d8817946407994dd9.png)

Now back to your original question; Here is how you actually handle the logic for for your needs.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/f/39f3bdafdf270fd8f41451aad2efe83a6800cc09.png)

---

<div class="post-metadata">

**Author:** ![LyssaSugarNya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lyssasugarnya/32/722321_2.png) [@LyssaSugarNya](https://forums.unrealengine.com/u/LyssaSugarNya)\
**Post date:** [August 14, 2023, 7:11pm UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136/6 "2023-08-14T19:11:02Z")

</div>

Omg, thank you! that worked. That really helped me out a lot and I really appreciate you for taking the time to help me out. Thanks.

---

<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:** [September 13, 2023, 7:11pm UTC](https://forums.unrealengine.com/t/how-to-use-hasallitem-in-verse-for-conditional-button/1257136/7 "2023-09-13T19:11:25Z")

</div>

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