help me from this: "TypeError: undefined is not a function"
Javascript/Plugin Supportscreenshot the console.
Basically you're telling us where you made the mistake: you tried to load an old savefile after adding a script/plugin.
There are some simple script/plugins that don't store data in the savefiles, and a very few complex scripts that catch old data from incompatible savefiles, but 95% of all more advanced plugins/scripts can only work if you start a new game after installing the script/plugin.
Soo please start a new game after you installed the plugin, and the problem will most probably be gone for all savefiles based on that new game, at least until you install another complex script.
Did you read Andar's post? He's telling you what caused the error.
After you add a new plugin, start a new game - do not try to load a save file that was created before the plugin was added.
After you add a new plugin, start a new game - do not try to load a save file that was created before the plugin was added.
sir, its not working again even i start a new game and save.then i load it, TypeError appears.
Moving to JS Plugin Support
It looks like there's an error in the plugin.
Can you either provide a link to the plugin, or show us what is on line 742 of the script?
It looks like there's an error in the plugin.
Can you either provide a link to the plugin, or show us what is on line 742 of the script?
SIR, HERE IS THE LINK OF THE PLUGIN I PUT IN MY PROJECT
https://drive.google.com/file/d/0B_97KWiBTWbbSm9pQ1E0M0FJV1k/view?pli=1
https://drive.google.com/file/d/0B_97KWiBTWbbSm9pQ1E0M0FJV1k/view?pli=1
I don't know if this will solve the problem, but can you go to line 741 and change the == to === instead?
if( formationManager() === null) return 4;
Let me know how it goes.
if( formationManager() === null) return 4;
Let me know how it goes.
SIR, NOW, IT CANNOT START MY GAME, WHEN I CHANGE == TO ===.
What does the error say in the console log now?
My guess would be: BFormationManager is defined inside an anonymous function, so JSON.parse can't recognize it, when reading the savefile and creates a normal object, instead. Since that object doesn't belong to the BFormationManager prototype anymore, it doesn't know about the currentFormation() function.
/edit: As a test, you could try adding this at the very end of the plugin (still inside the function):
/edit: As a test, you could try adding this at the very end of the plugin (still inside the function):
Code:
window.BFormationManager = BFormationManager;
I am very thankful, now, my project runs very well, when i add this (window.BFormationManager = BFormationManager 😉 thank you very much.
Original thread: https://forums.rpgmakerweb.com/threads/help-me-from-this-typeerror-undefined-is-not-a-function.52583/

