I am getting the following error:
cannot read property "update scroll" of undefined
I have narrowed it down to the "Plugin Command: CamFollow event X" command causing it. This event number (X) varies depending on the map - some maps currently don't have such an event to center to. I would understand that possible being problematic.
However, what I am noticing though is that the plugin command is being read before other events.
With respect to my screenshot, I actually get the error without the "test" text appearing. Thus, I am assuming the software is reading the plugin command before the text command which is the first event in this autorun event.
If I place the plugin command elsewhere, such as in another conditional branch that cannot be accessed, I get no error messages and the "test" text appears.
View attachment 44500
Hi Rink27,
I think the most likely explanation is that the Event with the chosen ID (12 in this case) does not exist on the map. If an Event 12 exists on the map, it should work, but if an Event 12 does not exist, then that event is "undefined." Therefore, it would be impossible to update the scrolling for an undefined event/object.
I'm not sure how the program detects that an impossible to run plugin command will be run prior to showing the text. It might have something to do with how the program detects event commands that come after text boxes, to see if multiple text boxes should run together. But I'm just speculating. It makes total sense that, if the plugin command causing the problem is in an inaccessible conditional branch, then no problem will occur. Since you figured that out by testing it, I know you are thinking like a programmer.
So, I still think that the fix is to make sure that if the plugin command requests Event 12, make sure Event 12 exists on the map, or else the plugin command will fail. If I were to make this plugin ideal, it wouldn't crash the game, but would instead just make an error message appear in the console window. RPG Maker MV's designers were smart enough to put safety stuff in their event commands to prevent errors like that, but my plugin command requires specifics to avoid a crash. Not ideal, of course, but it still will work when given those specifics. I'm busy with school right now, or else I would try to figure out a fix. So, we'll just have to use it as is, for now. Just make sure the Event 12 (or whichever Event ID you choose) is present on the map before you request it.