VE Battle Motions defeat. error undefined not a function

I was wondering if anyone here has run into this problem. I am using Victors Battle Motion plugin and whenever the party is defeated I get an undefined is not a function error. The only plugin I have are Basic Module and Battle Motion. Heres a link to the plugin https://victorenginescripts.wordpress.com/rpg-maker-mv/battle-motions/


debug.png
PLEASE give a link to the script - don't make us go searching for it (and don't paste the whole thing into your post - just provide a link).


Did you add the script and then resume a previously saved game?  That is often the cause of these errors.  If you did, try starting a new game instead and see if the error still happens.
No I saved before testing it. I even made a new game and still get the same problem. I have seen the question asked on The website for the script but was never answered. I was seeing if anyone here has an answer for it.
hmm ... can you tell me what line 1899 is in that plugin?


This is what I see:


1898 VictorEngine.BattleMotions.processDefeat = BattleManager.processDefeat;
1899 BattleManager.processDefeat = function() {
1900 $gameTroop.performVictory();
1901 VictorEngine.BattleMotions.processDefeat.call(this);
1902 };


Without being very familiar with the script, I would expect line 1900 to throw an error, as I can't find a performVictory function for Game_Troop either in this plugin or in the VE_BasicModule script, and in the default scripts that function only exists for Game_Actor and Game_Party.  It could be in one of the other plugins listed at the top of this plugin, or in an older version of the VE_BasicModule plugin, but I didn't look for those.


@Victor Sant could that be the issue?  Do you have a fix?
For some weird reason (most likely a mistake while updating the Basic Module) I removed the code that added preforVictory to the enemy troop.


Anyway you can remove this line, it was added just for a future feature and when this feature comes it will be there if you update the plugin.

Original thread: https://forums.rpgmakerweb.com/threads/ve-battle-motions-defeat-error-undefined-not-a-function.69895/