MZ Cannot read property 'pages' of undefined

Hi guys! Using VisuStella Events and Move Core.

I am calling a common event (which can be seen below).


In a specified map I get this error:
Cannot read property 'pages' of undefined.

Some others map, the command will work.

1663192612906.png

This is the log:
1663192845228.png




Any clues?


1663192576739.png
the key of the error message is the "of undefined", which means that the engine is missing a data object it has been told to use.

together with the property "pages" that means it is missing an event - a map event as nothing else has pages.

so which event are you trying to spawn?
the key of the error message is the "of undefined", which means that the engine is missing a data object it has been told to use.

together with the property "pages" that means it is missing an event - a map event as nothing else has pages.

so which event are you trying to spawn?
Thanks for your quick answer!

I am trying to spawn the event 18 from map 115.

1663193390151.png

1663193537496.png
Hi there!
By your error log, it can be a compatibility issue with other plugins that are being triggered in specific situations, since you said that it works on other maps.

But it can also be a setup that you did wrong. Usually, this error happens in property pages of undefined, when the maker code is not able to read a property from an event data. Meaning that the event does not exist.
Where the error happens:
1663201781137.png


  1. So maybe, on your map, you are trying to get something from the Spawned event before it is created?
  2. Or somehow you erased the Spawned event, and then, when another operation(event or plugin) is trying to access this event, it is already gone.
  3. Or even, there is some plugin that is trying to access information on this event before it is being set up, on the initialize funtion.
Can't know for sure, maybe if you provide more information on a map that is working and then on the map that is not working, someone that understands better these plugins can help you.

If you try to set the Check Event Collision argument to false, it works?
Hi there!
By your error log, it can be a compatibility issue with other plugins that are being triggered in specific situations, since you said that it works on other maps.

But it can also be a setup that you did wrong. Usually, this error happens in property pages of undefined, when the maker code is not able to read a property from an event data. Meaning that the event does not exist.
Where the error happens:
View attachment 240440

  1. So maybe, on your map, you are trying to get something from the Spawned event before it is created?
  2. Or somehow you erased the Spawned event, and then, when another operation(event or plugin) is trying to access this event, it is already gone.
  3. Or even, there is some plugin that is trying to access information on this event before it is being set up, on the initialize funtion.
Can't know for sure, maybe if you provide more information on a map that is working and then on the map that is not working, someone that understands better these plugins can help you.

If you try to set the Check Event Collision argument to false, it works?

Thanks for your help!
After your input, I have tried to remove every other plugin but the respawn ones.

It's worked, so it's probably a compatibility issue.
As time goes by, I see how complicated is to mix VisuStella plugins with others 😛
I will completely remove VisuStella from my game.

-------

And, setting the Check Event Collision argument to false INDEED works!

Any clue why's that? Great aim you have I must say!

Thanks for your help!
Event Spawning is one of the most difficult things in RPG Maker because this feature was never intended. Therefore, there's no "standard" that we, developers, can follow. I already struggled for hours to make my plugin compatible with others.
Thanks for your help!
After your input, I have tried to remove every other plugin but the respawn ones.

It's worked, so it's probably a compatibility issue.
As time goes by, I see how complicated is to mix VisuStella plugins with others 😛
I will completely remove VisuStella from my game.

-------

And, setting the Check Event Collision argument to false INDEED works!

Any clue why's that? Great aim you have I must say!

Thanks for your help!
I guess the collision stuff was the problem because it is being mentioned on the last line of the error log on the console.
The last line is something like the root of the cause.

Sorry to hear about compatibility. Hope you find another plugin for that. If I'm right, I think Galv has a Spawn and Template plugin!

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