Type Error: isBattleMember

Discussion in 'RPG Maker MV' started by plubic_void21, Jul 24, 2018.

  1. plubic_void21

    plubic_void21 Noobveloper Member

    Messages:
    25
    Likes Received:
    24
    First Language:
    english
    Primarily Uses:
    RMMV
    I'm not a technical person by any means, i've tried to understand where this issue is coming from, but i'm unfortunately dumbfounded. I recently started working head first on this commercial project, when i'm hit with the error
    "Type Error: cannot read property "isBattleMember" of undefined" whenever i open the main menu during playtest.

    I've replicate the error twice but still not sure what's causing it. The image below is of the error both in the console and game window. If anyone understands what's the issue here please inform me, i'm stumped.

    upload_2018-7-23_22-36-19.png

    Edit: Also, if i have this in the wrong thread, feel free to place it in the correct place, the forum is just so massive, it's hard to know where's where really, and i'm really sorry for the inconvenience,
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,635
    Likes Received:
    6,576
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Does this happen on a new game or when you load a saved game?
    What Version is your projects rpg_core.js file? (Open with Text editor to check)
     
    #2
  3. plubic_void21

    plubic_void21 Noobveloper Member

    Messages:
    25
    Likes Received:
    24
    First Language:
    english
    Primarily Uses:
    RMMV
    Hi, thanks for replying. The error happens on both new and load games, and I'm running version 1. 5. 1 in the rpg_core.js file.
     
    #3
  4. SwiftSign

    SwiftSign Veteran Veteran

    Messages:
    184
    Likes Received:
    45
    First Language:
    English
    Primarily Uses:
    RMMV
    #4
  5. plubic_void21

    plubic_void21 Noobveloper Member

    Messages:
    25
    Likes Received:
    24
    First Language:
    english
    Primarily Uses:
    RMMV
    Thank you for replying, "The requested URL /OrangeHud.js was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request
    " I'm getting this error when i click on plugin links in chrome, but i've followed all the instructions, and i got the plugin from GitHub

    Also, the issue doesn't seem plugin based, since i've turn off and deleted all the plugins and the issue persist
     
    Last edited: Jul 24, 2018
    #5
  6. Andar

    Andar Veteran Veteran

    Messages:
    28,635
    Likes Received:
    6,576
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Then we need an update on the error.
    Turn of all plugins, start a new game and then when the error comes up give us the console screenshot you get then.
     
    #6
    plubic_void21 likes this.
  7. plubic_void21

    plubic_void21 Noobveloper Member

    Messages:
    25
    Likes Received:
    24
    First Language:
    english
    Primarily Uses:
    RMMV
    I went to take the screenshot, but for some reason the program wouldn't let me run the playtest something about a missing index.html file, so i did a complete wipe and reinstall of the program, then turned off all the plugins and it started working. Now rto check who's the culprit causing me all the headache.

    Edit: I found the little bugger, removing it will remove an entire mechanic, but it was a self made plugin, that tried to show only the members who will be in battle in the menu screen rather than all the members in the party.

    Thanks for helping me narrow it down, i really appreciate it. would've drove me insane had i attempted to do it alone.
     
    Last edited: Jul 24, 2018
    #7
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    37,806
    Likes Received:
    11,511
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    If it's a self-made plugin, you don't have to remove it and lose the entire mechanic - you just have to find out where the bug is and fix it.

    mmm ... you didn't change the starting party by deleting slots in the Actors tab, did you?
     
    #8
    plubic_void21 likes this.
  9. plubic_void21

    plubic_void21 Noobveloper Member

    Messages:
    25
    Likes Received:
    24
    First Language:
    english
    Primarily Uses:
    RMMV
    Right, that's what i did. instead of four, i put two, because some of the actors weren't finished. You think that could have caused the issue of the menu bugging out? Because the plugin wasn't anything special, it just changed the attempted to show only the battlers int he party rather than the entire party...

    Window_MenuStatus.prototype.maxItems = function() {
    return $gameParty.maxBattleMembers();
    };
     
    #9
  10. Andar

    Andar Veteran Veteran

    Messages:
    28,635
    Likes Received:
    6,576
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @plubic_void21 then re-add new actors, go to the starting party (where you suddenly see the new actors in the party again) and remove the new actors from the party before deleting them on the actors tab again.

    You're getting the error because your party is still four actors, but two or those four are undefined because you deleted their definition in the actor tab without removing them from the starting party.
    The starting party is defined in the system tab.
     
    #10
    plubic_void21 likes this.
  11. plubic_void21

    plubic_void21 Noobveloper Member

    Messages:
    25
    Likes Received:
    24
    First Language:
    english
    Primarily Uses:
    RMMV
    Yeah, i did that before i reinstalled the program. It was definitely the plugin i used, with the attempt to show only the battling party in the menu. i removed the plugin and everything worked fine, but i had to clean reinstall the program, because the plugin seemed to have broken something in either the scene.manager and yanfly core engine plugin. Thanks so much for the help again, otherwise i'd have lost my mind XD
     
    #11
  12. Shaz

    Shaz Veteran Veteran

    Messages:
    37,806
    Likes Received:
    11,511
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    The plugin wouldn't have broken your program.

    If you had removed starting party members by deleting slots in the Actors tab, instead of removing them from the Starting Party list in the System tab (which is the correct way), and then you started a game and saved it, you would get issues probably constantly from that game, even after you removed the plugin, because the party lineup has been saved.

    A plugin to only show battlers in the menu should be pretty easy - just a matter of finding the existing methods, and replacing $gameParty.members() with $gameParty.battleMembers(). However, if you do it like that, how are you going to swap party members around?
     
    #12

Share This Page