MV ERROR!! YEP_BuffStatesCore?

Ok so throughout playtesting today, I encountered the following error:

1626757326047.png


I kept playtesting and eventually narrowed it down to a state effect being applied by one of my skills. Basically, I have a Passive called "Trauma". This is what it does:
Physical Critical Hits deal an additional 30% damage over 3 turns and reduces Healing received by 30% for the duration.
I notice the error appears every time I try to hover over/select a unit with this state applied (not the passive state, but the state applied by the passive effect which contains the DoT component). I'm led to believe that it's due to the damage dealt by the DoT is a decimal/fraction instead of an integer/whole number. However, I already made sure to use Math.round() in my formula, so I'm pretty much at my wit's end now...
JavaScript:
<Custom Apply Effect>
target._trauma = Math.round(target.result() * 0.1);
</Custom Apply Effect>
<Custom React Effect>
if (value < 0 && this.isHpEffect()) {
  value = Math.round(value * 0.7);
}
<Custom React Effect>
<Custom Regenerate Effect>
value = target._trauma;
target.gainHp(-value);
BattleManagerTBS.activeEntity().addPopup(value);
</Custom Regenerate Effect>
<Custom Leave Effect>
delete target._trauma;
</Custom Leave Effect>

Edit: Ok, I see now...I just did a console.log(target._trauma); and it returned "NaN".
Edit2: Hmm, I just realized I was supposed to use target.result().hpDamage instead of target.result().
Edit3: SOLVED!! 🙏
Do you sometimes feel like nobody's listening and you're just talking to yourself? lol!

Nice job figuring it out on your own!

Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/error-yep_buffstatescore.138712/