MZ rpg_managers.js:1756 TypeError: Cannot read property 'length' of undefined

can anybody help me?


rpg_managers.js:1756 TypeError: Cannot read property 'length' of undefined
at Sprite_Animation.setupDuration (rpg_sprites.js:1235)
at Sprite_Animation.setup (rpg_sprites.js:1217)
at Sprite_Character.Sprite_Base.startAnimation (rpg_sprites.js:61)
at Sprite_Character.setupAnimation (rpg_sprites.js:405)
at Sprite_Character.updateAnimation (rpg_sprites.js:387)
at Sprite_Character.update (rpg_sprites.js:216)
at rpg_core.js:4197
at Array.forEach (<anonymous>)
at ShaderTilemap.Tilemap.update (rpg_core.js:4195)
at rpg_core.js:3569
SceneManager.catchException @ rpg_managers.js:1756
SceneManager.update @ rpg_managers.js:1717
requestAnimationFrame (async)
Are you using MV or MZ? Your post title says MZ, and your profile says MZ, but rpg_sprites.js, rpg_managers.js and rpg_core.js are all MV scripts.

Did you port your game from MV to MZ and include the js folder when you shouldn't have, or are you really using MV?
You've tagged this MZ but your error is with rpg_sprites.js. That isn't possible: MZ's core file is called rmmz_sprites.js. So which version are you using?
I'm using MZ, it could be because of plugins, I started the project in MZ, when I disable all plugins it keeps the same error.

sorry for the bad English
No, it is because you have the MV scripts in your MZ project.

Why did you replace the MZ core scripts with MV ones?
I don't remember having a replacement, all the scripts I downloaded were from MZ


What would I have to do in this case?
Can you show us a screenshot of the js folder in your project? It should look like this.
1623464743942.png

We're talking about the *core* scripts, the ones that are added automatically when the project was created. You shouldn't have had to download anything for those.
1623464845704.png
Those rpg_ files shouldn't be there. I have no idea how they ended up there, but delete them and it should solve your problem.
When I start the project it has a black screen

I'm thinking about redoing the project
Yeah, that's probably for the best. Just create a new project and copy your data files/resources over to it.
Which folders should I copy?
The data and img folders should be all you need to begin with. Once you've verified that it displays as expected you can restore plugins and whatnot.
What exactly did you download? When you start a new project, there should be nothing at all to download.

Are you following somebody's tutorial and did they provide a demo project or something? If that's the case, the demo project is an MV project and you should not copy stuff over, but redo it manually in MZ.
Thank you very much, I managed to solve it by creating another project and copying the files

Original thread: https://forums.rpgmakerweb.com/threads/rpg_managers-js-1756-typeerror-cannot-read-property-length-of-undefined.137389/