Game crashing whenever I try optimize or clear equips

Discussion in 'Javascript/Plugin Support' started by Midnight Kitty, May 19, 2018.

  1. Midnight Kitty

    Midnight Kitty Midnight Veteran

    Messages:
    124
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV

    Attached Files:

    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,315
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Does this happen if you start a new game, or did you load an old savefile?

    We need a screenshot of the full error message from the console (F8), a screenshot of your plugin manager and the version number of the projects RPG_core.JS file (might be older than the editor Version)
     
    #2
  3. Midnight Kitty

    Midnight Kitty Midnight Veteran

    Messages:
    124
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    I was loading an old save file.
    This is the full error from the console
    Code:
    TypeError: Cannot read property 'LB_toDatabaseObject' of undefined     at Game_Actor.changeEquip (LB_EquipVariables.js:179) at Game_Actor.clearEquipments (rpg_objects.js:3698) at Game_Actor.optimizeEquipments (rpg_objects.js:3705) at Scene_Equip.commandOptimize (rpg_scenes.js:1487) at Window_EquipCommand.Window_Selectable.callHandler (rpg_windows.js:902) at Window_EquipCommand.Window_Command.callOkHandler (rpg_windows.js:1426) at Window_EquipCommand.Window_Selectable.processOk (rpg_windows.js:1156) at Window_EquipCommand.Window_Selectable.processHandling (rpg_windows.js:1027) at Window_EquipCommand.Window_Selectable.update (rpg_windows.js:984) at rpg_core.js:7033
    SceneManager.catchException @ rpg_managers.js:1949
    fullerror.png
    Edit: It works if I start a new game.
     
    #3
  4. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,556
    Likes Received:
    977
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    You'll have to disregard your old save file if you want to use that plugin but then you should be fine. Any plugin that changes the way data is saved or loaded will cause the saves to be incompatible.
     
    #4
  5. Shaz

    Shaz Veteran Veteran

    Messages:
    37,554
    Likes Received:
    11,267
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    The old savefile issue is only if you saved a game and then added a plugin. So if your saved game was started prior to adding that particular plugin, then that's likely the reason.

    Loading old saves after adding new plugins is possibly the number one cause of "cannot read property <...> of undefined" errors. Start a new game and see if the error continues to happen. If it does, then it could be that the plugin hasn't been configured properly, or a compatibility issue.
     
    #5
  6. Midnight Kitty

    Midnight Kitty Midnight Veteran

    Messages:
    124
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    The save file was made after the plugin was added so I don't see why it would happen then. I have had that plugin in the project for quite some time without noticing this issue.
     
    #6
  7. Shaz

    Shaz Veteran Veteran

    Messages:
    37,554
    Likes Received:
    11,267
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I just noticed you've got two plugin errors there, and one is with my heal on level up plugin. You MUST give it the correct name, or it won't work. Unfortunately the names/titles in Pastebin are in a readable format, and that's what it downloads as when you hit the Download link. Please rename the plugin to HealOnLevelUp.js and reset the parameters.

    Have you added ANY new plugins since you first started that game? The crash is happening because there is nothing equipped in the specified slot. Have you added a plugin that increases the number of slots, or does anything at all with equipment slots? I don't think you can add extra slots without a plugin - I'm pretty sure the database only allows you to rename them, but not add extra ones.

    If you had started a game, saved it, and added such a plugin (one that adds extra equipment slots), it would totally cause this error, because actors are saved with the setup they had when they first joined the party. If you change something in the database, or using plugin parameters, then resume the saved game, they do not get the new settings, because it loads the actor data from the save file rather than the database.
     
    #7
  8. TWings

    TWings The Dragon Whisperer Veteran

    Messages:
    319
    Likes Received:
    582
    Location:
    Kyoto
    First Language:
    French
    Primarily Uses:
    RMMV
    I don't have RM open right now, so I can't check, but I believe you can add as many equipment slots as you wish in the database, since I added 2 or 3 more than the default setting in my current project.
     
    #8
  9. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,893
    Likes Received:
    12,014
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA

    I've moved this thread to Plug-In Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #9
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,554
    Likes Received:
    11,267
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You're right - just took a look now. You can add new equipment types, and they will give you new slots on the actor tab (that's nice to confirm, as it could come in handy for my own project). So it might be possible to get this error even without a plugin to add new equipment slots. But the slots are still saved against the actor, which is saved in the save file, so jury's out on that one.

    Anyway - the error is because it's looking for equipment in a slot that doesn't have anything.
     
    #10
  11. Midnight Kitty

    Midnight Kitty Midnight Veteran

    Messages:
    124
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    I did not add in any extra plugins from the save file. Just a few more weapons and armor.
     
    #11

Share This Page