SaburoX

Veteran
Veteran
Joined
Jan 27, 2013
Messages
96
Reaction score
8
Primarily Uses
Hi. I'm trying to get this Region Event Triggers plugin working but on startup I'm confronted with an error that reads:
Code:
TypeError Cannot read property 'pages' of null
I thought it might be a conflict with another plugin in my project, but I tried turning everything else off and even put it in a fresh project by itself and got the same result. It works in the demo the authors provided but that's the only time I can get it to work and I don't see any difference or plugins that weren't included.
Any guidance in fixing this would be much appreciated.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,371
Reaction score
8,395
First Language
German
Primarily Uses
RMMV
"of NULL" means the project is missing data.

while that can be an incompatibility, that is a rarer case.

the most common causes for these errors are:

1) not configuring a plugin when it is entered into the game - the more complex plugins absolutely require correct configuration of all options, you cannot "enter and ignore" them.

2) loading an older savefile - most cases of changes in the plugin manager make all older savefiles incompatible and you cannot continue old playtests, you need to start a new playtesgame the next time you choose to playtest.

3) missing data in the database - if you deleted part of the database and forgot to reconfigure the plugin by telling it what the database now contains, it can result in the same type of errors.


only after checking those three options I would check plugin order and plugin compatibility.

and in all those cases we need screenshots to help, both of the console output of the error and of the plugin manager.
 

SaburoX

Veteran
Veteran
Joined
Jan 27, 2013
Messages
96
Reaction score
8
Primarily Uses
Right, sorry. First off here are the plugin manager and console output error:
Plugin Manager.pngConsole Error.png

Now, as for the other points:

1. There don't appear to be any parameters to set up in this plugin. The instructions say how to set up an event to make use of its effects but there's nothing I can modify in the plugin manager. Is there someplace else I should be looking for things to set up?

2. I have no save files at all, so I'm not sure what it would be loading from.

3. I haven't touched the database at all from a new, blank project. I've compared it to the working demo of the plugin and other than being in English versus (I think) Ukranian and the default new project having more actors, the database entries are all the same. None of which seems like it would effect this. Is there a way to change how regions work or events are triggered via the database?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,894
Reaction score
14,994
First Language
English
Primarily Uses
RMMV
At a quick glance, it looks like the plugin does not cater for the fact that event numbers may not be sequential. It will work if you have 20 events on the page, but if you delete event 3 (in the editor), it will crash when it tries to look at event 3's pages, because there IS no event 3.

Probably just need a line added to say "skip this event if it's null", but I'm not sure what the right syntax would be for that and don't have the time at the moment to look it up.

You could follow the forum link and see if anyone else has reported a similar problem.
 

SaburoX

Veteran
Veteran
Joined
Jan 27, 2013
Messages
96
Reaction score
8
Primarily Uses
That's sounding like it's definitely on the right track. I ran some more tests and it will load properly if there's at least one event on the map. It doesn't even have to be an event that calls the plugin.
However if there are no events on the map, or there's a gap in the event list sequentially like you proposed, then I get the error.

I checked the forum links already and there are no fixes or problems of the sort posted. Is it possible that since this was written MV updated in such a way as to cause it?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,894
Reaction score
14,994
First Language
English
Primarily Uses
RMMV
Very unlikely. The version on mvplugins.com was only posted in April - a month ago. The version on the RU forum looks like it was posted in late 2018, just after MZ was released. MV had had all its significant updates before then. Later ones were more about nwjs I believe.

This is something that wouldn't be detected if someone had just created a test map for the purpose of testing the plugin. It would only be encountered if they had deleted events on the map and not created new events afterwards.
 

SaburoX

Veteran
Veteran
Joined
Jan 27, 2013
Messages
96
Reaction score
8
Primarily Uses
Okay so out of curiosity I wanted to see if the erase event command would cause anything to break and in the process I discovered something else strange.

I make a fresh project, add three events and the plugin, the plugin plays.
I then delete two of the events, save the project, and test it again, now it gives me the error.
Put two events in to fill in those numbers in the sequence, and it works again.

Additionally, if I set an event to erase itself, I get a new error upon entering a test region:
type error 2.pngConsole Error2.png

At no point do I ever create a save file, just saving the project file in the editor.
Is it possible that the plugin is recording in an initial number of events within itself, and throwing up an error if it detects a discrepancy from that number?
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Just a little close up shot...
w2xZocX.jpg
finally drew the last member of "team outcast" for my game. since my game has a lot fighting game elements in it, there's bosses in teams of three like King of Fighters.
Run Script Calls & Play Unique Sound Effects With Each Skill & Item | RPG Maker News #113

Let's continue making our game in MZ! Touchfuzzy is... still eventing... though this time we may be working on eventing some tutorial stuff for our players!

I work late on the game so I sleep in then I wake up late so I have to work hard to make up for sleeping in meaning I work late again and sleep in again... what a nasty cycle.

Forum statistics

Threads
113,848
Messages
1,077,916
Members
147,926
Latest member
DrimCr
Top