Actor's HP Reaches Nan When Death Occurs?

Hi guys!

So, I'm having a few issues with my game in the sense that, when my character's are fighting battlers, and they get killed by an enemy, their HP doesn't go to 0. It just says NaN (not a number) I'm assuming. Same with their MP. When it reaches 0, they can still use magic. I'm sure I'm doing something silly, but I was wondering if anyone has ever run into something similar before? 🙂

I also have a few plugins by Yanfly and some other popular people. Let me know if anyone knows any that usually have this effect.

Here's a screenshot of what I mean below:

Capture.jpg.html
Capture.jpg


Much appreciated if anyone knows!

Thanks! 😀
Does it always say NaN or only when they're reduced to 0? I'm guessing from your post that it's the latter but just double-checking.

Also, can you list the plugins you're currently using? If it's not too many, try sequentially turning them off and dying in battle again to see if it still says NaN. That'll help you narrow down which plugin is the culprit.
Does it always say NaN or only when they're reduced to 0? I'm guessing from your post that it's the latter but just double-checking.

Also, can you list the plugins you're currently using? If it's not too many, try sequentially turning them off and dying in battle again to see if it still says NaN. That'll help you narrow down which plugin is the culprit.

Yes, it always only seems to happen when the character reaches 0/Nan. But thanks for asking!

Thanks Trihan, that's a good idea! I will do so and report back and figure out which plugins may be the problem.

Here at the one's in that are in use at the moment:

Plugins_01.jpg
[/URL]

(There aren't anymore below after that.)
The most likely candidates are plugins that affect battles or states, but you never know with these things. I await your results.
The most likely candidates are plugins that affect battles or states, but you never know with these things. I await your results.

So, I turned OFF the plugin I had a hunch about that might have been causing it, and I think I half fixed the problem. I turned off the YEP_AutoPassiveStates Plugin. The actor now can die, and can no longer use magic after running out of MP. (It may have been because even though I turned this Plugin ON, I never actually assigned it to do anything and caused things to mess up a bit. Will try and see what happens after messing around with it a bit more.)

BUT! The other problem I'm now having, is when the Actor heals themselves, if they already have an HP gauge that is full. Like 50/50 HP for example, instead of staying at a number of 50/50 for max HP. It turns into Nan again. D:

And I don't really know what could be causing this issue now.
Do you have Notepad++?
Do you have Notepad++?

I don't, but I could definitely download it 🙂.

Why so?
You can do "find in files" in Notepad++, which would allow you to search all of your plugin js files for certain terms and things. It would help to debug.
I don't know if that is the cause, but at least one of your yanfly plugins is in the wrong order, and that usually has strange effects
It's the autopassivestates that needs to be moved higher, check yanfly's website for the correct order
Hey everyone!

Sorry for the late response, But thank you all for the advice, and Andar was right, I did misplace some of the scripts. 🙂
Also Notepad++ has been downloaded and has also been a great help!

Thanks guys!

Original thread: https://forums.rpgmakerweb.com/threads/actors-hp-reaches-nan-when-death-occurs.75463/