I am not sure if this belongs in this forum but as I point out in the title I might have found an error in the source code of RPG Maker MV when it comes to the class change command.
So here is the deal while atempting to make a simple Keep Exp on class change plugin( cause why not) I was having this wierd error pop up:
TypeError: object is not a function at Game_Actor.changeClass (rpg_objects.js:3956) at Game_Interpreter.command321 (SterlingCollection.js:42) at Game_Interpreter.executeCommand (rpg_objects.js:8894) at Game_Interpreter.update (rpg_objects.js:8802) at Game_Map.updateInterpreter (rpg_objects.js:6080) at Game_Map.update (rpg_objects.js:5987) at Scene_Map.updateMain (rpg_scenes.js:417) at Scene_Map.updateMainMultiply (rpg_scenes.js:409) at Scene_Map.update (rpg_scenes.js:398) at Function.SceneManager.updateScene (rpg_managers.js:1673) at Function.SceneManager.updateMain (rpg_managers.js:1641)Assuming I had done something wrong I kept trying out stuff an eventually presumed the error was not mine.
Game_Actor.prototype.changeClass = function(classId, keepExp) { if (keepExp) { this._exp[classId] = this._exp(); } this._classId = classId; this.changeExp(this._exp[this._classId] || 0, false); this.refresh();};this._exp is both considered a fuction in the right side of the operation and _exp is NOT a function so we obtain the error above.
Therefore when you try to run that this function while keepExp is true. It will cause the above error.
So here is the deal while atempting to make a simple Keep Exp on class change plugin( cause why not) I was having this wierd error pop up:
TypeError: object is not a function at Game_Actor.changeClass (rpg_objects.js:3956) at Game_Interpreter.command321 (SterlingCollection.js:42) at Game_Interpreter.executeCommand (rpg_objects.js:8894) at Game_Interpreter.update (rpg_objects.js:8802) at Game_Map.updateInterpreter (rpg_objects.js:6080) at Game_Map.update (rpg_objects.js:5987) at Scene_Map.updateMain (rpg_scenes.js:417) at Scene_Map.updateMainMultiply (rpg_scenes.js:409) at Scene_Map.update (rpg_scenes.js:398) at Function.SceneManager.updateScene (rpg_managers.js:1673) at Function.SceneManager.updateMain (rpg_managers.js:1641)Assuming I had done something wrong I kept trying out stuff an eventually presumed the error was not mine.
Game_Actor.prototype.changeClass = function(classId, keepExp) { if (keepExp) { this._exp[classId] = this._exp(); } this._classId = classId; this.changeExp(this._exp[this._classId] || 0, false); this.refresh();};this._exp is both considered a fuction in the right side of the operation and _exp is NOT a function so we obtain the error above.
Therefore when you try to run that this function while keepExp is true. It will cause the above error.