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

123uconduit

Villager
Member
Joined
Mar 20, 2017
Messages
29
Reaction score
2
First Language
english
Primarily Uses
RMMV
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.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
Press fn+F8 to open the console when you see the error. Can you post a screenshot of the console?
 

123uconduit

Villager
Member
Joined
Mar 20, 2017
Messages
29
Reaction score
2
First Language
english
Primarily Uses
RMMV
@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 ...
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
Perhaps just F8. I always think in Macs and laptops.
If you see something like this...

Can you post what the first and second red line says, like the numbers and stuff on the right side?
 

123uconduit

Villager
Member
Joined
Mar 20, 2017
Messages
29
Reaction score
2
First Language
english
Primarily Uses
RMMV
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.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
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
 

123uconduit

Villager
Member
Joined
Mar 20, 2017
Messages
29
Reaction score
2
First Language
english
Primarily Uses
RMMV
@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...
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
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.


Click that button to open the console, when you see the Type Error page.
 

Shinma

Lurker
Veteran
Joined
Dec 29, 2012
Messages
756
Reaction score
337
First Language
English
Primarily Uses
RMMV
Are you hitting playtest before you press F8?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,191
Reaction score
6,758
First Language
German
Primarily Uses
RMMV
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.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
First steps? The error console is the only first step.

I could have this solved by now if he could get the thing open.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,191
Reaction score
6,758
First Language
German
Primarily Uses
RMMV
@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.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
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
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,191
Reaction score
6,758
First Language
German
Primarily Uses
RMMV
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.
 

123uconduit

Villager
Member
Joined
Mar 20, 2017
Messages
29
Reaction score
2
First Language
english
Primarily Uses
RMMV
@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?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,191
Reaction score
6,758
First Language
German
Primarily Uses
RMMV
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.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
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

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

123uconduit

Villager
Member
Joined
Mar 20, 2017
Messages
29
Reaction score
2
First Language
english
Primarily Uses
RMMV
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.
 
Last edited:

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
581
First Language
English
Primarily Uses
RMMV
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?



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.
 
Last edited:

123uconduit

Villager
Member
Joined
Mar 20, 2017
Messages
29
Reaction score
2
First Language
english
Primarily Uses
RMMV
@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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

My kitty still young (3-4 months), I think I could teach her some funny tricks... like: "Play dead-ly good music for my games"
Here's a quality DPS class idea: The Beekeeper, who uses the "Bees!!" skill to attack and poison enemies.
Please don't create long, boring cutscenes in which characters do nothing but stand around talking.
What if I took a lesson from Half Minute Hero? Let the player get dumb powerful each area, but reset them down to just slightly stronger than before for the next map?
Been averaging 2-3 hours sleep for almost a month now. Starting to space out all the time ^^;

Forum statistics

Threads
94,269
Messages
919,516
Members
123,988
Latest member
inazumaelevenspain
Top