# what is wrong with this code?

**URL:** <https://forums.unrealengine.com/t/what-is-wrong-with-this-code/2146573>\
**Category:** Verse\
**Tags:** unreal-engine, unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [November 23, 2024, 5:30pm UTC](https://forums.unrealengine.com/t/what-is-wrong-with-this-code/2146573 "2024-11-23T17:30:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fesled](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fesled](https://forums.unrealengine.com/u/fesled)\
**Post date:** [November 23, 2024, 5:30pm UTC](https://forums.unrealengine.com/t/what-is-wrong-with-this-code/2146573/1 "2024-11-23T17:30:19Z")

</div>

![Screenshot 2024-11-23 122756](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/f/58f45a9abbf63ae9028d063003cd4c265562a339.png)  
 ![Screenshot 2024-11-23 122824](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/c/a7cfb1d33ae1fa5c678a1bbfde360eda63f421e5.png)

---

<div class="post-metadata">

**Author:** ![Soy\_Ema\_31](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soy\_Ema\_31](https://forums.unrealengine.com/u/Soy_Ema_31)\
**Post date:** [November 23, 2024, 9:10pm UTC](https://forums.unrealengine.com/t/what-is-wrong-with-this-code/2146573/2 "2024-11-23T21:10:45Z")

</div>

OnTimerEndHandler():void=

The issue with your code is that the function is missing a return type. If the function doesn’t return any value, you need to specify `void` as the return type. This tells the compiler that the function won’t produce a return value. Alternatively, if the function is supposed to return something (like an integer, a string, etc.), you should explicitly define the appropriate return type.

Additionally, if your function requires parameters, you need to specify them within the parentheses.

---

<div class="post-metadata">

**Author:** ![fesled](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fesled](https://forums.unrealengine.com/u/fesled)\
**Post date:** [November 23, 2024, 9:59pm UTC](https://forums.unrealengine.com/t/what-is-wrong-with-this-code/2146573/3 "2024-11-23T21:59:21Z")

</div>

> [@Soy\_Ema\_31](#):
>
> OnTimerEndHandler():void=

i get this error,  
Dangling `=` assignment with no expressions or empty braced block `{}` on its right hand side.(3104)

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [November 24, 2024, 4:40am UTC](https://forums.unrealengine.com/t/what-is-wrong-with-this-code/2146573/4 "2024-11-24T04:40:46Z")

</div>

Ok so, you need to put the code inside a device class kinda like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/7/7873da9e34b323802364d05fdae7f2a5d053e2f0.png)
