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

Say, does anyone know any other indie game development forums? Progress on my uni survey has been a little slow, so I wanna look into posting it around a bit more.
Due to the bullies' resurgence on Facebook and Twitter against my friend (and I since I defend), we've decided to move over to tumblr to try to obscure our presence, where we might finally be at peace working on games. If anyone wants my/our game's tumblrs to follow lmk. :kaojoy:
Is there anyone need help with anything except art and music?
is Gotcha Gotcha Games Inc. = KADOKAWA CORPORATION? I haven't found this topic yet, Want to know for credits on my game. Thanks.

Forum statistics

Threads
104,300
Messages
1,005,394
Members
135,825
Latest member
uniteditcare
Top