problem with a type error I am hoping an angel on here can help me with

I am having a problem with the YEP Actor Party System. When I go to switch my party in battle it lets me do it but after I select finish it says "Type Error Undefined is not a function".

I've been stuck on it for a few days. I've tried moving the pluggins around but nothing seems to work. Any help would be mostly appreciated because it's really halted my progress in creating my game and has taken a lot of the fun out of it.
Press fn+F8 to open the console when you see the error. Can you post a screenshot of the console?
@mogwai Thanks for reaching out to help. When I push fn + f8 it doesn't do anything. Does that work for Macs as well? I took a screenshot on my computer and it says that the file is too large. Please help me ...
Perhaps just F8. I always think in Macs and laptops.
If you see something like this...
Screen%20Shot%202017-03-23%20at%2012.37.13%20AM.png

Can you post what the first and second red line says, like the numbers and stuff on the right side?
Thank you so much again and being so patience. I tried pressing F8 and nothing happened. Do you know what the command that is "fn + f8" is called? Maybe I can look up how to do that on a mac.
On Mac if you don't have an fn key, you've got to disable the iTunes controls keys, and enable F1, F2, Etc, keys.
Apple Menu > System Preferences > Keyboard
Screen%20Shot%202017-03-23%20at%201.35.11%20AM.png
@mogwai Thanks again for your patience and I'm so sorry it isn't working for me but I did that and still the f8 key or any combination of that does anything in the program. Does it matter if I'm using steam? Maybe there is another way to get the info. Is there a specific name to the folder maybe I could research some alternative methods. You are truly an angel for continuing through this with me and I need to express my deep gratitude because this has been driving me absolutely crazy lately. I just want to play my game but this type error...
This happens to me sometimes too, the F8 doesn't open the console in RMMV.

I'll help you enable the mouse button to the console instead. This looks like a lot of steps, but it's really simple.

In Finder, click the "Go" menu > "Go to Folder" and paste this path.
Code:
~/Library/Application Support/Steam/steamapps/common/RPG Maker MV/RPG Maker MV.app/Contents/MacOS/nwjs-osx/Game.app/Contents/Resources/app.nw

Open package.json with TextEdit or TextWrangler or something. Mine looks like this.
PHP:
{
    "name": "KADOKAWA/RPGMV",
    "main": "index.html",
    "js-flags": "--expose-gc",
    "window": {
        "title": "",
        "toolbar": true,
        "width": 816,
        "height": 624,
        "icon": "icon/icon.png"
    }
}
Where it says
Code:
"toolbar": false,
change it to
Code:
"toolbar": true,
Save it and re-open your project and in the playtest, you should have a button like this.
Screen%20Shot%202017-03-23%20at%202.44.14%20AM.jpg


Click that button to open the console, when you see the Type Error page.
Are you hitting playtest before you press F8?
just a few background-infos, because mogwai jumped over the first steps into the details, and it might be that you don't need to give the screenshot if the error was more simpler.

Type errors (and nilclass errors) can only happen if you install a plugin - they cannot happen in a default project that doesn't use any scriptcode at all.

The most common cause for such an error is if you installed a plugin and then loaded a saved game from before the plugin installation. That is because most plugins require a new game to set themselves up correctly, and if you don't start a new game you'll get those typeerrors as soon as the new plugin needs its data.
So please check if the same problem happens if you start a new game and don't load the old saves (you can basically delete those old saves because you have to remove the plugins to make those usable again.

The second most common cause is to forget to configure the new plugin properly - a lot of plugins require configuration both in plugin properties and in notetags and sometimes their own datafiles. If you didn't configure that, they might cause those errors or they might simply not work at all.

The third most common cause is incompatibility between several plugins - that is where the console screenshot becomes important, because it will list all plugins involved in that error.
First steps? The error console is the only first step.

I could have this solved by now if he could get the thing open.
@mogwai sorry to disagree, but the first step is always to ask if the error is the same if the player starts a new game (or alternatively ask if he loaded a savefile before that error happens). Because if the error is due to wrong (old) datastructures in the savefile, then there is absolutely nothing wrong in any plugin and the player just forgot to start a new game after adding one or more plugins.

Of course you can get to the same solution by reading what data is wrong or missing in the console and tracking it down until you find out that it is missing because it wasn't in the old (and now incompatible) savefile - but simply asking to test with a new game gets to the same point much faster, especially if I see how many problems some people have to get to the console...

If the same error happens on new game, then of course the console is needed. but more than half the cases like this are solved by starting a new game, that is simply the year-long experience of the people giving support here.
JS is cached with the saved game? Dude, I edit my plugins and load save games all the time.

I'm drooling to see how Yanny used a function type wrong. It would be an honor to debug for the bigs.

Type error is something like this I think.
PHP:
var foo = function(){
   //do stuff, no return
};
var bar = foo(); // returned undefined, but I think it's an array
// trying out my array
bar.push(1);// <= type error
JS is cached with the saved game? Dude, I edit my plugins and load save games all the time.
Not javascript, but data. If a plugin doesn't add data to the saved structures, then it can work with saved games.

But if for example a plugin adds data to the actors, then that data gets saved when the actors are saved - and if the savedgame is loaded again, that data gets automatically loaded as well.
However, if you load an old savefile where that data is not yet stored in, the plugin requiring that data doesn't get it on loading that old savefile.
And that can result (depending on what data is needed) in typeerrors or nilclass errors or similiar.
@Andar Thanks for the advice, I have been starting a new game every time. I've gone through the configuration of the pluggins at obsessively for days trying to change things around so while that is possible I do not feel it is the problem. I think it has the do with the YEP Actor party switch pluggin because it goes away when I disable that but it is pretty important to my game so I need that. @mogwai you are truly awesome. I change the toolbar to true after opening test play (which I wasn't doing before thanks to @Shinma for that tip) and found the page you asked for @mogwai. I keep trying to post a screenshot but it says it's too large...

The first red lines say:

type error: undefined is not a function
at function.battlemanager.updateTurnOrderDisplayX

It seems that is where the problem lies. Is there anyway to include the turn order display without it messing up the game?
The first red lines say:
type error: undefined is not a function
at function.battlemanager.updateTurnOrderDisplayX
sorry - that doesn't really help.
There is a reason why we asked for a screenshot of the console like the example given above, because every line counts.
The lines also tell you what file they're executed in, and that identifies the plugins involved - and we need the entire stack to learn all of the involved plugins.
In the line you copied we can't even see if that battlemanager function is executed in the core files or if it has been replaced by a plugin, because you didn't type the full line.
I googled updateTurnOrderDisplayX and it only seems to be in one script.

Do you have this script?
http://yanfly.moe/plugins/en/YEP_X_TurnOrderDisplay.js

It has a notice that says "not to be used with ATB or CTB" that's all I could gather. The only thing I can think of is you need it on or you need it off.

The line number really does help, so if you would quote it please?

Andar is just trying to back up his unnecessary bickering, me thinks. Debugging without the line number is bonkers.

If you can't get the dev tools console open in the game wrapper (I'm not sure what's up with that), perhaps you could open the index.html
Screen%20Shot%202017-03-23%20at%208.09.38%20PM.png

in the game folder.
Open it with Chrome and open Devtools ⌥ + ⌘ + J (Option+Command+J), or in Firefox: Shift + ⌘ +J (Shift+Command+J).
Yes I have that plugin.

It doesn't let me copy past for some reason and when I try to upload the screenshot it says it too large. I can't win hahaha but here is some hand typing that might help

type error: undefined is not a function
at function.battlemanager.updateTurnOrderDisplayX
/users/owner/documents/games/project/is/plugins/YEP X TurnOrderDisplay.is:302
at function.battlemanager/makeActionOrders
/users/owner/documents/games/project/is/plugins/YEP X TurnOrderDisplay.is:316
at Game_Action.clear

What I have learned after you helped me to enable the fn+f8 command is that the Turn Order Display Pluggin seems to be the real issue. When I turn that off I can switch fine. The Turn order thing is really cool but not vital to my game so if there doesn't seem to be a simple solution I'll just leave it off but if possible I would still like to use it. Maybe you have an idea @mogwai ?

Again I can not express my gratitude enough and sorry if it's annoying but really appreciate taking your time to help me. It means so much and even if I can't have turn order display I can still play the game and switch party which is still great news. I am so happy.
I have that MV copy/paste console bug too. It must be a Mac thing. For future reference, you can highlight and do a slow drag of the text instead of typing it all. Also if the screenshot is too big, you can crop it with Preview: highlight area, and CMD + K.

That is a neat plugin, btw. We don't want you to sacrifice it.

Is this the exact problem?
Screen%20Shot%202017-03-23%20at%209.46.26%20PM.png

Screen%20Shot%202017-03-23%20at%209.55.44%20PM.png


I know how I made it undefined, but now I've got to find out what is making it undefined. I'm already assuming that you have battle core plugin turned on before this one. Am I correct?

It's clearly defined in the script. The only thing I can think of is that you have another script changing the SceneManager._scene in the middle of the battle. I'll tinker around with this.
@mogwai Yes I have battle core plugin before this and yes that is my exact problem. I would love to keep the plugin so if you can figure out how to have them both that would be sensational. Thank you for the great advice that'll make it easier in the future.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-a-type-error-i-am-hoping-an-angel-on-here-can-help-me-with.76266/