MV Cannot Read Property "Contains" of Undefined

Hello all.

So I've recently come across an issue with my RPG maker MV playtesting which, up until now, never existed.

Whenever I enter a new area using the "transport player" code, the following error pops up:

1659072396028.png



I've never come across this issue before and I'm not sure exactly what it means by "'contains' of undefined."
I've tried looking on the internet and saw similar issues but not the exact same issue so I was wondering if there
is a particular way I should go about fixing this?

I've already made a backup of the file just in case, but this issue has popped up within the past hour-or-so when it hasn't existed in the past months.

Any ideas?

Here is my plugin list just in case:

Plugins-1.PNG

Plugins-2.PNG


I appreciate any help!
Anything "of undefined" means your game is trying to access something you're giving it that doesn't exist in your database.

Reading the error trace you posted, it pretty clearly seems that Transfer Player has nothing to do with it. There might be an autorun or parallel event in the area you're transferring into?

Something is running plugin commands (that you had to type into an event) for Galv's Message Sounds, a Slot Machine, then Yanfly's Quest Journal. The Quest Journal plugin command is trying to reference something that doesn't exist, either a quest number or an objective within the quest or something.

So check your commands for whatever event would be running at that point.
Anything "of undefined" means your game is trying to access something you're giving it that doesn't exist in your database.

Reading the error trace you posted, it pretty clearly seems that Transfer Player has nothing to do with it. There might be an autorun or parallel event in the area you're transferring into?

Something is running plugin commands (that you had to type into an event) for Galv's Message Sounds, a Slot Machine, then Yanfly's Quest Journal. The Quest Journal plugin command is trying to reference something that doesn't exist, either a quest number or an objective within the quest or something.

So check your commands for whatever event would be running at that point.
I found it!

It was this cheeky little bugger:

1659073288340.png


For some reason the game absolutely HATES it when I try to update a plugin command using an "if , else" statement.

Not sure how I'll replace it, but I'll come up with something lol. Thank you for your help!
On further inspection it was simply because I tried to constantly update the plugin since it would perpetually check for the bread. :elswt:

Oops lol. Still not sure what that has to do with half of the plugins listed in the error, but oh well.
That's a consequence of how plugin commands are set up. If the RM-engine encounters a pluging command it calls a defined function called Game_Interpreter.pluginCommand() to which it passes the text that was entered in the plugin command.
Now every plugin that provides you with plugin commands can hook into that function and look at the text to determine what, if anything, it needs to do.
The order in which your plugins get to look at the command depends on their load order (which you determine with the plugin manager).

So all these mentioned plugins simply looked at the text and decided "that's not for me, let's pass it on to the next one" until Yanfly's Quest Journal said "this is for me and I need to do x" where then x failed because presumably you can't complete a quest more than once? I am actually not that familiar with this specific plugin 😅
That's a consequence of how plugin commands are set up. If the RM-engine encounters a pluging command it calls a defined function called Game_Interpreter.pluginCommand() to which it passes the text that was entered in the plugin command.
Now every plugin that provides you with plugin commands can hook into that function and look at the text to determine what, if anything, it needs to do.
The order in which your plugins get to look at the command depends on their load order (which you determine with the plugin manager).

So all these mentioned plugins simply looked at the text and decided "that's not for me, let's pass it on to the next one" until Yanfly's Quest Journal said "this is for me and I need to do x" where then x failed because presumably you can't complete a quest more than once? I am actually not that familiar with this specific plugin 😅
Oh! Okay! That actually makes a ton of sense lol.

But yeah, since the event was permanently set to parallel processing and was continuously checking for if the party had "X" item (in this case it was Whole Grain Bread), the game decided that it was too much hassle to Update the Yanfly Quest List every single frame. Honestly I don't blame the poor engine, it was my own fault :elswt:
@Corealys
you also have a problem with the order of your yanfly plugins.

yanfly plugins have to be in exactly the order given on his website, top to bottom, and your order is different from that.

please reorder to prevent other errors later, and make sure to start new games after that - all older savefiles will become incompatible as the result of that reordering.
On further inspection it was simply because I tried to constantly update the plugin since it would perpetually check for the bread.
Right - make sure that you understand what the autorun and parallel settings for events mean, and when to use each.

And you should almost never have a parallel event without a Wait command at the bottom - without one, they run every frame (60 times a second) which is rarely necessary.

Original thread: https://forums.rpgmakerweb.com/threads/cannot-read-property-contains-of-undefined.149907/