MZ Cannot read property 'match' of undefined

would that work even if the whole thing is written in one single line?
do we look at the character pointer from the beginning?
I'm assuming so since it works for all the VS plugins.
Is there any other information you need?
Can you show a screenshot of your img\faces, img\characters and img\sv_actors folders showing those files exist as you've spelled them?

Which actor are you testing on, ID 1 or 2?

Are the enemies in the test battle using regular sprites or SV battlers?

P.S- I tried to put VisuStella's gif in the message but the website said the file was too big so rip.
Right-click and...depends on your browser. Copy image location? Open image in new window and get the address?

Basically, paste the URL of it instead of trying to attach it to the post.
Can you show a screenshot of your img\faces, img\characters and img\sv_actors folders showing those files exist as you've spelled them?

Which actor are you testing on, ID 1 or 2?

Are the enemies in the test battle using regular sprites or SV battlers?


Right-click and...depends on your browser. Copy image location? Open image in new window and get the address?

Basically, paste the URL of it instead of trying to attach it to the post.
Here are the files they get transformed into:
As you can see, Actor1_1 and Actor1_2 are present.
1670986933542.png


Then we have what they originally look like:
The actor image for Draikonz is here, as well as the the transformation that is not used for this test.
1670987019242.png

And here's Marianne's sprite as well:
1670987155844.png

--------------------------------------------

Next, we have the Character sheets:
For this one it's easy since Marianne and Draikonz share the same sheet.
1670987257542.png

---------------------------------------------------------
And finally we have the face sheets:
I took all the faces for the screenshot but only one of them is actually used in the code.
1670987371420.png

1670987397576.png


Now, for your question, the problem is with the second, third and fourth party slot. No matter who I put there, once that character is transformed, it crashes the game when I try to flee or win the fight.

The enemy is a static image, it was an sv_battler before but I removed the code thinking it was the problem. Turns out I was wrong.

For the gif, here's the link:
Google Drive NoCrash gif download

I had to use GoogleDrive for the link since just copy pasting the link for the Gif gave me an error 403.
Here are the files they get transformed into:
There are some problems with this. You show the Actor1_1 and Actor1_2 from the sv_actors folder. However, your screenshots of the characters and faces folders don't show the filenames referenced in your code. I presume you're showing us the original files instead, but you don't say in any of your posts what those original filenames are that are being referenced by actors 1 and 2.

I do see that there are still face files with spaces in them, so if you're referencing Draikonz_teen 2 or 3, or Marianne IV, you have not eliminated that as a possibility for the crash.

Now, for your question, the problem is with the second, third and fourth party slot. No matter who I put there, once that character is transformed, it crashes the game when I try to flee or win the fight.
That just makes it feel even more to me like there's something configured screwy in your project. Nothing in the code has any reference to where the actor is in the party, so it's hard to see how that could make any difference in what's happening.

To be clear, if you make a new project, change nothing except turning it to side-view battle, add those three plugins and the code that VisuStella said works - recreate their project exactly - does it work or crash?

Because that gif seems to demonstrate the second party member transforming and then transforming back upon victory.
So I just used the same project I sent them and I changed the same thing they did to make it work.

I did all of that just now and the thing crashed again.



Also oops I did forget to add some _ in the names thanks for pointing that out.

Unrelated:

Does RPG Maker MZ have a cache of some sort?
So I pretty printed the code in the console and I managed to pinpoint the places where the console says an error was found. So I'll post screenshots of it here:
1671053242590.png

---------------------------------------------------------------------------------------------------------
at Game_Actor.<computed> [as hasStaticSvBattler] (VisuMZ_1_BattleCore.js:formatted:25435) =
1671053299540.png


at Sprite_Actor.Sprite_Battler.<computed>.<computed> [as hasStaticSvBattler] (VisuMZ_1_BattleCore.js:formatted:28493) =
1671053356467.png


at Sprite_Actor.<computed>.<computed> [as updateFrame] (VisuMZ_1_BattleCore.js:formatted:28901) =
1671053391055.png


at Sprite_Actor.Sprite_Battler.updateMain (rmmz_sprites.js:formatted:577) =
1671053457164.png


at Sprite_Actor.Sprite_Battler.<computed>.<computed> [as updateMain] (VisuMZ_1_BattleCore.js:formatted:27937) =
1671053491741.png


at Sprite_Actor.updateMain (rmmz_sprites.js:formatted:913) =
1671053538124.png


at Sprite_Actor.Sprite_Battler.update (rmmz_sprites.js:formatted:556) =
1671053577812.png


at Sprite_Actor.Sprite_Battler.<computed> [as update] (VisuMZ_1_BattleCore.js:formatted:27925) =
1671053624256.png


at Sprite_Actor.<computed>.<computed> (VisuMZ_0_CoreEngine.js:formatted:16851) =
1671053683571.png


at Sprite_Actor.<computed>.<computed> (VisuMZ_1_BattleCore.js:formatted:28660) =
1671053705871.png
if
return this[...]()[...]
allows for (/\$/i)
then this[...]() must be a string, and the last [...] must be the call to 'match'

which means this[...(0x933)]() must be the call to grab that string, which must lead to something like [...].match(/<....>/) from the note box.

do a search for (0x933) as the function's definition and see what it does.
In the end, I managed to make it work using common events so there's no need for that request anymore.

But thank you so much for everyone who spent so much time on this anyway. It did help me understand javascript better.
.......ok?
but what was the solution?
and most important: what was the problem that the solution somehow avoided? 0o
.......ok?
but what was the solution?
and most important: what was the problem that the solution somehow avoided? 0o
So instead of using the big javascript that used to work but then suddenly stopped, I decided to do the transformation using Common Events. So the code looks like this now:
<JS On Add State> if (user.actorId() === 1) { $gameTemp.reserveCommonEvent(95); } if (user.actorId() === 2) { $gameTemp.reserveCommonEvent(96); } </JS On Add State>

And it actually works so I'll keep using that since I can finally continue working on my project.

However, I don't know what caused the issue in the first place and I probably never will.

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