I just read about macros on wiki and I think I found an error in code http://lmwcs.com/rptools/wiki/HP_and_Health_Bars
In red line i think it should be [h:Nlthl = max(Nlthl-hpChange, 0)].[h:status = input(
"hpChange|0|Number of Hit Points",
"dmgOrHealing|Damage,Healing|Is the character taking damage or being healed?|RADIO|SELECT=0",
"lethalOrNo|Lethal,Nonlethal|Is the damage lethal?|RADIO|SELECT=0")]
[h:abort(status)]
[if(dmgOrHealing == 0),CODE:
{
[if(lethalOrNo == 0),CODE:
{
[h:HP = HP - hpChange]
[h:bar.Health = (HP - Nlthl) / MaxHP]
[r:token.name] loses [r:hpChange] hit points.
};
{
[h:Nlthl = Nlthl + hpChange]
[h:bar.Health = (HP - Nlthl) / MaxHP]
[r:token.name] loses [r:hpChange] hit points.
};]
};
{
[h:diff = MaxHP - HP]
[h:HP = min(HP+hpChange, MaxHP)]
[h:Nlthl = max(Nlthl+hpChange, 0)]
[h:bar.Health = (HP - Nlthl) / MaxHP]
[r:token.name] is healed and gains [r:min(diff,hpChange)] hit points.
};]
Minus, not plus.
I'm just beginner so please excuse me if I'm wrong. Just started to write codes.