Type Error

Sorry I've tried to solve this one myself but cannot work it out nor find it in the forums.


Issue I'm having is whenever I enter a battle or win or lose I will face a type error

Type Error Cannot Read property 'loseBattle' of null

And viceversa for victory. I'm not sure whats causing it if I'm honest


I also cannot test battles as it cannot find Test_Quests.Json but I don't know if that's related


If anyone has had this or know what it means it would be really helpful 🙂
Usually when that happens one of three things are happening:


1: You have some plug-ins installed but forgot to install their prerequisite plug-ins.


2: You installed some plug-ins but forgot to start a new game (the most common cause).


3: You installed some plug-ins but they use another plug-in that is not updated, and needs to be updated.


So, start by looking at your plug-in list. And make sure you are staring a new game first.


As for the battle test, some plug-ins make it so that battle test no longer works. You may have to test the battles in game instead.
Are you using any plugins?
I've merged this with your other identical topic, since both have replies, on the assumption is was an accidental double topic.
Yeah, when I put some new plug-ins into my game, I needed to start a new save file from the beginning of my game, else I'd get the error upon loading up an old save.
Usually when that happens one of three things are happening:


1: You have some plug-ins installed but forgot to install their prerequisite plug-ins.


2: You installed some plug-ins but forgot to start a new game (the most common cause).


3: You installed some plug-ins but they use another plug-in that is not updated, and needs to be updated.


So, start by looking at your plug-in list. And make sure you are staring a new game first.


As for the battle test, some plug-ins make it so that battle test no longer works. You may have to test the battles in game instead.

Cheers 🙂  I found it with the log. I cant believe I've only just learnt its there. Looks like it has something to do with enhanced Tp as when disabled it all works fine.

TypeError: Cannot read property 'loseBattle' of null
    at Game_Actor.Game_BattlerBase.getTpEval (YEP_EnhancedTP.js:2929)
    at Game_Party.allMembersGainTp (YEP_EnhancedTP.js:3126)
    at Function.BattleManager.endBattle (YEP_EnhancedTP.js:2776)
    at Function.BattleManager.endBattle (YEP_X_ActorPartySwitch.js:169)
    at Function.BattleManager.processDefeat (rpg_managers.js:2461)
    at Function.BattleManager.checkBattleEnd (rpg_managers.js:2400)
    at Function.BattleManager.checkBattleEnd (YEP_BattleEngineCore.js:1504)
    at Function.BattleManager.updateEventMain (rpg_managers.js:2078)
    at Function.BattleManager.updateEventMain (YEP_X_BattleSysATB.js:974)
    at Function.BattleManager.updateEvent (YEP_BattleEngineCore.js:1643)

I'm going to guess it has something to do with the Losebattle calculation but I haven't played with this plugin so not too sure what to make of it

I've merged this with your other identical topic, since both have replies, on the assumption is was an accidental double topic.

Yes, thanks, I wasn't sure as to or not as they were different problems I faced but anything to help keep it clean 🙂  

Original thread: https://forums.rpgmakerweb.com/threads/type-error.69781/