[Problem] The provided double value is non-finite (Fixed, dumb mistake)

Status
Not open for further replies.

JugoTHEBot

ME EAT YOU WHOLE
Member
Joined
May 8, 2019
Messages
4
Reaction score
6
First Language
Spanish
Primarily Uses
RMMV
So, yeah this is my first post so i'm sorry if i'm doing something wrong.

Anyways back on the topic, i've been doing some tests battles and for some reason whenever an enemy does the "Dual Attack", "Triple Attack" and a custom "Tackle" skill the game crashes leaving this message.
I've also made a screenshot for plugin order, said skills and what the console says about it.

It only happens if the enemy does it, and Tackle SOMETIMES crashes the game (every time the player survives the attack).
Also i've noticed that it missed once and the game Didn't crash so i'm thinking it does that everytime the attack kills a party member.

Sidenote: Yeah don't worry about the default stuff, it's mostly placeholders (trying to learn how to draw first), and about the skills, while it is crashing because of the default skills and i'm removing them later, i'm still concerned it may happen to other skills i'll add.

Thank you.
 

JugoTHEBot

ME EAT YOU WHOLE
Member
Joined
May 8, 2019
Messages
4
Reaction score
6
First Language
Spanish
Primarily Uses
RMMV
EDIT: Nevermind i'm dumb, I fixed it myself.
Turns out the game doesn't really like enemies to use skills with formulas based around the character's level, i removed it and the attack works now.
So i guess from now on if i want an enemy to use Skills based on level i should probably use the Enemy Level plugin.
Sorry for the inconvenience!
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,109
First Language
English
Primarily Uses
RMMV
For anyone who might find this later with a similar issue, here is what happened:

  1. If you use any values inside a damage formula that are not defined, Javascript refers to this as undefined
  2. Any mathematical operation with undefined will result in a value of NaN - which means "Not a Number"
  3. RPG Maker MV core code has a safety check where if the value of the damage is NaN (unsafe), it sets the value to zero (safe)
  4. Some plugins such as YEP Damage Core remove this safety check for an unknown reason, which leads to unsafe behavior
  5. If the character has a HP of 100 and then the damage is applied: 100 minus NaN is NaN
  6. The game then tries to draw the HP gauge with NaN/100 HP. NaN is a non-finite value, and therefore it crashes because you can't draw a gauge with a non-finite value, because NaN is not a number
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,613
Reaction score
5,155
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Woke up on an awful nightmare of being banned here because some mod didn't liked me in a super-heroes freeform round robin RP where I used throwing normal hammer as power and it was qualified being too OP. XD Nice to read you all guys. Will not wait next nightmares.
Staring at all the RPG Maker versions I have and realizing that my project has been a long time coming. But, I finally feel like I have the knowledge and experience to make it into something good.
We're almost done with the jam game! :D
I get scam calls all the time so today I gave them a piece of my mind. They hung up on me. Sweet revenge.

Forum statistics

Threads
104,321
Messages
1,005,561
Members
135,844
Latest member
andrewshetty123
Top