Actor's HP becomes NaN when using a heal spell

Discussion in 'RPG Maker MV' started by Olra, Jul 6, 2018.

Thread Status:
Not open for further replies.
  1. Olra

    Olra Global Derp Member

    Messages:
    22
    Likes Received:
    74
    First Language:
    English
    Primarily Uses:
    RMMV
    I have a particularly weird issue. Whenever I heal an actor, the actor's HP doesn't heal and their box becomes NaN (Not a Number), thus is unable to die, as seen here:

    [​IMG]

    I've never seen this issue nor have I seen it it documented like this - only NaN with death. And while I have some yanfly plugins equipped I don't have Auto-Passive States as of now. The state I have on it is also empty.

    [​IMG]

    I've never seen anyone run the same thing, just a similar issue. Is there a fix for this?
     
    #1
  2. Olra

    Olra Global Derp Member

    Messages:
    22
    Likes Received:
    74
    First Language:
    English
    Primarily Uses:
    RMMV
    I might've actually figured it out, I used the wrong variable... :aswt:
    Edit: Gonna see if it's not just a figure of my imagination. If it's the fix i'm closing it.

    Edit 2: Somehow it still persists even after fixing the formula, so the problem is still a thing. Uh...
     
    #2
  3. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    600
    Likes Received:
    334
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    What is the formula for your heal spell? NaN (Not A Number) means you tried to either a) divide by 0, or b) do math on something that isn't a number- text, undefined values, whole objects, or something else that became NaN. So if any value in the healing process is invalid, the final heal result becomes NaN, which is added to the player health, in turn making that NaN.
     
    #3
    RachelTheSeeker likes this.
  4. Olra

    Olra Global Derp Member

    Messages:
    22
    Likes Received:
    74
    First Language:
    English
    Primarily Uses:
    RMMV
    a.mgi + a.atk * 2 + 20

    I probably keep messing up the formula, because I forget things and through looking at other heal spells it's a.mat instead of a.mgi, which I have replaced Magic Attack with Magic in the system.
     
    #4
  5. Olra

    Olra Global Derp Member

    Messages:
    22
    Likes Received:
    74
    First Language:
    English
    Primarily Uses:
    RMMV
    Okay, it IS that I ultimately forgot that magic is put as "mat". I'll be closing the thread due to solving the problem now.
     
    #5
    RachelTheSeeker likes this.
  6. hiddenone

    hiddenone Lurker Extraordinaire Moderator

    Messages:
    2,001
    Likes Received:
    4,717
    First Language:
    english
    Primarily Uses:
    RMMV

    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.

     
    #6
Thread Status:
Not open for further replies.

Share This Page