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.
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
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.
there’s no such thing as a while kind of method. loop: should be by itself, and you check for break statements inside it
loop:
if(PlayerIsDead):
break
set TimeAlive+=1