MZ ERROR: Cannot read property 'match' of undefined

Greetings, first time I post in here, and I was in serious need of help for the following issue:

Recently I have started putting down the skills for my game, one of them in particular is a skill that Stops time (Which affects both Enemies and Allies, excluding the User, courtesy of Vizustella plugin allowing me to add <Cannot Target User> Notetag) and while I did previously tested this Skill with the MC (which can change fighitng styles, and with each style it would use different Spritesheet, and I thanks "LucasRiot" for the code template that allows me to achieve this) it worked just fine, but the moment I made another character use that, the game crashes with the error mentioned:

Error1.png


And this is what the log says:

error2.png


By intuition I think the issue is caused by the fact that, in order to achieve the style change/Transformation, the Character already has a state on, and when another character forces a State on them, it causes the Crash, but hearing more expert opinions might help me, especially if showing the Transformation script used on the style state:

Error3.png


I really hope to get to the bottom of this, as I really wish to keep at least the style change mechanic (If it ends up something that can't be done, I guess I'll make a few plot changes to accomodate a more Permanent Style change at a certain point.)

Thanks for reading this far.
The error basically says that the parent of the property match is undefined.

Perhaps an alternative to better explain it: Pictures have a property "sizex", and the error "cannot read property sizex of undefined" means that the picture itself does not exist or has been deleted.

So the engine tries to match something and doesn't find one of the data objects it tries to match with.
The error basically says that the parent of the property match is undefined.

Perhaps an alternative to better explain it: Pictures have a property "sizex", and the error "cannot read property sizex of undefined" means that the picture itself does not exist or has been deleted.

So the engine tries to match something and doesn't find one of the data objects it tries to match with.
The thing is, all Spritesheets are inside their respective folders. And don't seem to disappear whenever the state is applied. That is why it's very confusing why this happens in the first place, because if I use the skill with the transformed character, it's fine, but when it's done by an ally while the main character is transformed, the issue happens, and only in this specific way, cause if I let the battle finish, the character reverts back just fine.

UPDATE: OK, after reading that maybe the "Battlecore" was one of the causes of the bugs, I've tried to run a test with it disable, and the result was way more aberrant than expected:
As I tried to replicate the dynamics of the early crashes, I discovered that, upon activating the time stop skill, for some reason the "Transformation" code was force on the Ally (Not the character transformed) and turned invisible, while the main character showed the transformed state... without the actual state, as in "Cured", while keeping the graphics... even worse, if I tried to transform another character, despite having an actual graphic set for them, they'd turn invisible too.
My conclusion?! I guess I'll get rid of the Style change mechanic, cause the issues seems worse than what it first appears... but at least I've already made quite the skill library for diverse characters to use.

Original thread: https://forums.rpgmakerweb.com/threads/error-cannot-read-property-match-of-undefined.178091/