# How can I correct this verse error?

**URL:** <https://forums.unrealengine.com/t/how-can-i-correct-this-verse-error/2366586>\
**Category:** Verse\
**Tags:** unreal-engine, unreal-editor-for-fortnite, question\
**Created:** [March 1, 2025, 4:57pm UTC](https://forums.unrealengine.com/t/how-can-i-correct-this-verse-error/2366586 "2025-03-01T16:57:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DRINGZAP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DRINGZAP](https://forums.unrealengine.com/u/DRINGZAP)\
**Post date:** [March 1, 2025, 4:57pm UTC](https://forums.unrealengine.com/t/how-can-i-correct-this-verse-error/2366586/1 "2025-03-01T16:57:11Z")

</div>

Hello, I have an error verse “Unexpected ‘iCurrentHP’ following expression” that I can’t resolve. I tried to solve it by putting my “ICurrentHP” variable in my “custom\_player\_health” class, but it didn’t change anything. I’ve tried a lot of things, but my limited knowledge of Verse keeps me stuck on this error. If someone would be so kind and able to help me, I would be grateful. 🙂

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/0/b90083367240600ebfeb8267ac38d428d95aaef5.png)

---

<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:** [March 1, 2025, 6:53pm UTC](https://forums.unrealengine.com/t/how-can-i-correct-this-verse-error/2366586/2 "2025-03-01T18:53:25Z")

</div>

There’s 2 issues, firstly verse has no “while” you need to use `loop:` also iCurrentHP is never defined, if you wanted to use it you would need to do PlayerBar.iCurrentHP since it’s located inside the PlayerBar element

---

<div class="post-metadata">

**Author:** ![DRINGZAP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DRINGZAP](https://forums.unrealengine.com/u/DRINGZAP)\
**Post date:** [March 1, 2025, 8:03pm UTC](https://forums.unrealengine.com/t/how-can-i-correct-this-verse-error/2366586/3 "2025-03-01T20:03:44Z")

</div>

I tried to correct with your suggestions but it doesn’t work, however thanks for pointing out that “while” didn’t work in verse, I got confused with “if”.  
As a result, when I put the loop and “PlayerBar” in front of “ICurrentHP” it gives me this error: “Data definitions at this scope must be initialized with a value.” I’m assuming this can’t be initialized with a value, but I don’t see any other way of doing it, as I need to have my values.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/5/9a5a9b81e363ce4ab450e0542d28a6717df9bd1e.png)

---

<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:** [March 1, 2025, 8:43pm UTC](https://forums.unrealengine.com/t/how-can-i-correct-this-verse-error/2366586/4 "2025-03-01T20:43:05Z")

</div>

there’s no such thing as a while kind of method. loop: should be by itself, and you check for break statements inside it

```auto
loop:
   if(PlayerIsDead):
       break
   set TimeAlive+=1

```

---

<div class="post-metadata">

**Author:** ![DRINGZAP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DRINGZAP](https://forums.unrealengine.com/u/DRINGZAP)\
**Post date:** [March 1, 2025, 8:51pm UTC](https://forums.unrealengine.com/t/how-can-i-correct-this-verse-error/2366586/5 "2025-03-01T20:51:54Z")

</div>

There are always many mistakes. Maybe the problem is my indentation? Sorry if I’m having trouble understanding, but I’m still a beginner in code.  
I also don’t understand why “Health updated: {iCurrentHP}/{iTotalHp}” is underlined in red.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/1/661f0248e11044e3fd240faff8322a4ff230071d.png)
