What is this Error?

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,142
Reaction score
818
First Language
English
Primarily Uses
RMMV
1596495488357.png
This is the 3rd time I've gotten this error, but haven't been able to reproduce it reliably. It happens only when the enemy is inflicted with a Bleed state and the error occurs when I move the cursor over this enemy.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
708
Reaction score
435
First Language
English
Primarily Uses
RMMV
This error comes up when the engine attempts to draw a gauge (usually HP/MP or TP) and either the subjects current hp, mp, or tp, or their maximum hp, mp or tp is not an integer.

Given your description of when it happens, your bleed state is doing fractional damage to the enemy. Put in a Math.round() function into whatever it is you're using for that state to do damage. If a battler has 100/100 hp and you deal 6.1 damage to them instead of 6, the function that draws the gauge returns a NaN value, which cannot be drawn, and causes it to crash upon attempting to do so.

edit: it could also be that the bleed damage itself is undefined, which causes it to subtract 'undefined' from the targets current hp, which becomes NaN, which cannot be drawn. In this case, you'd need to look at the code being used to cause the bleed damage to see why it could be undefined instead of an expected value.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,142
Reaction score
818
First Language
English
Primarily Uses
RMMV
@ramza Ah, that makes sense. Thank you! This is what's in my Bleed state:
<Custom DoT Formula>
var bleed = target.result() * 0.75;
value = Math.round(bleed / 3);
variance = 0;
element = 0;
</Custom DoT Formula>

It was already using Math.round so I don't think it's a decimal issue...

Edit: Turns out it was the "target.result()" portion giving me an issue...
 
Last edited:

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
530
Reaction score
232
First Language
English
Primarily Uses
RMMV
I'm pretty sure target.result() is an object. You probably want something like target.result().damage instead. I don't remember if that's correct, but you can look up Game_ActionResult in rpg_objects.js for the valid attributes.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I think I've got my hero designs pretty much finialised ( still got some tweaks. ) In the end it'll be the four outfit colour variants with four different skintones.

I'm a bit conflicted. One the one hand, it's quite visually cool to make bodies of water that the player can interact with by going into it. However obscuring the player character from a gameplay perspective is pretty bad. Hmm... There's the option to make the area around the player visible, but then that kind of defeats the purpose of submerging them. :unsure:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Another two plugins done! One being an on map grid inventory.
busy with my newborn child, can't even touch pc at all ;_;

Forum statistics

Threads
104,295
Messages
1,005,349
Members
135,811
Latest member
napax
Top