I did all of what you guys said, doesn't work. It doesn't regenerate the players health, but the bottomprint flickers. I tested it different times to each different posts, almost same results.
And it spams errors that it can't find functions "getDamageLevel", "getDataBlock", & "setDamageLevel".
Is it spamming that it can't find object '0' attempting to call the above functions?
If so, that's because the client has no player, such as if they're loading or dead.
Also, with the OP code, if the player ever has between 60 and 59 or between 20 and 19 health, the function will stop working until the health is changed from that.
Lastly, I'm unsure if it really matters but I think the proper usage of else/if is
if(%blah && %rah)
{
dostuff();
}
else if(!%rah)
{
doOtherStuff();
}
In other words, else and if should be on the same line.
Oh wait. The bottomprint may be flickering because you're forgetting to use an argument for how long the bottomprint should last in seconds. It should be the next argument, right after the actual message.