# Cannot Cancel A Subscription based on tutorial

**URL:** <https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [February 9, 2024, 3:10pm UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460 "2024-02-09T15:10:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcoDank](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MarcoDank](https://forums.unrealengine.com/u/MarcoDank)\
**Post date:** [February 9, 2024, 3:10pm UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/1 "2024-02-09T15:10:27Z")

</div>

Hi everyone. 2 Days ago I started learning verse and I am working through the Epic tutorials. I am following this tutorial [Coding Device Interactions](https://dev.epicgames.com/documentation/en-us/uefn/coding-device-interactions-in-verse) The problem is that even though I copied and pasted the code exactly nothing gets added to my array and I can run the event multiple times. Is this happening to you as well or am I missing something , maybe a setting somewhere else ?

Thanks in advance for your time and help.

Best regards.

---

<div class="post-metadata">

**Author:** ![bananna\_manuk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bananna\_manuk](https://forums.unrealengine.com/u/bananna_manuk)\
**Post date:** [February 10, 2024, 8:40am UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/2 "2024-02-10T08:40:16Z")

</div>

had a qiuck look but i dont see any array in those code blocks

that tutorial shows you the different methods on subscribing to events

when you subscribe to an event you are telling the code to listen for the event signal you have subscribed to

when the code detects the signal it calls the function contained within the brackets and passes the agent

eg

```auto
MyButtonDevice.InteractedWithEvent.Subscribe(OnButtonInteractedWith)

```

would call the OnButtonInteractedWith function

you can use print statements to do abit of logging on screen whilst you test your code that may help you debug

post your code and any errors you get with a brief description what you are trying to do

---

<div class="post-metadata">

**Author:** ![MarcoDank](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MarcoDank](https://forums.unrealengine.com/u/MarcoDank)\
**Post date:** [February 18, 2024, 7:32am UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/3 "2024-02-18T07:32:11Z")

</div>

Thanks for your help I will try that and see what happens

---

<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:** [February 19, 2024, 7:32am UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/4 "2024-02-19T07:32:06Z")

</div>

ButtonSubscription := Button.InteractedWithEvent.Subscribe(OnButtonInteractedWith)  
# Add the cancelable result to a spot in the Subscriptions array.  
CPrint(“Hello”)  
if(set Subscriptions[0] = ButtonSubscription):  
CPrint(“Subscribed to the Button’s InteractedWithEvent and set the subscription in Subscriptions!”)  
else:  
Print(“Sub failed”)

If you add an else statement, you will see the array is failing to initialize. The code does compile without error but adding or accessing values from an array is a failable expression and it is definitely failing. If I can figure out why, I will update. One solution is to just get rid of the array for now, so you can see how the button event and the cancel sub function works. The array is not required for that functionality.

---

<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:** [February 19, 2024, 6:42pm UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/5 "2024-02-19T18:42:45Z")

</div>

Watch this video:  
[Verse Code Exampe](https://youtu.be/kUIypbuoCbk)

---

<div class="post-metadata">

**Author:** ![MarcoDank](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MarcoDank](https://forums.unrealengine.com/u/MarcoDank)\
**Post date:** [March 7, 2024, 9:27am UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/6 "2024-03-07T09:27:14Z")

</div>

Thank you man

---

<div class="post-metadata">

**Author:** ![MarcoDank](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MarcoDank](https://forums.unrealengine.com/u/MarcoDank)\
**Post date:** [March 7, 2024, 9:28am UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/7 "2024-03-07T09:28:01Z")

</div>

Thanks for the link I will watch it

---

<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:** [April 6, 2024, 9:28am UTC](https://forums.unrealengine.com/t/cannot-cancel-a-subscription-based-on-tutorial/1676460/8 "2024-04-06T09:28:48Z")

</div>

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