Getting a typeerror after a random encounter

I'm not sure if this is the right spot for this but I couldn't find anywhere else.

So every time I have a random encounter when the fight ends I get a "TypeError" with "Cannot read property 'name' of undefined"
Hi!
Can you press f8 or f12 and send us a screenshot of the console error?
Screenshot (13).png


I'm also noticing this isn't consistent, some times the victory plays no problem. Other times the type error comes up. It's like it happens at the moment the victory animation is supposed to play.

Edit: whether I use Side view battles or not does not effect this.
okay - there's something wrong with a drop item. Can you determine if it's always on the same troop, or if all the troops contain a common enemy?

My initial guess is that you've set up a drop item from an enemy, and have then deleted that item from the Items tab without removing it from the drop list.

The reason it's random may be that you've given the enemy several drop items, so when it works, they're giving you the item defined in one of the other slots - it's only when this slot gets selected that the problem occurs.
Yep, that seems to have been the problem. I think I gave them the blank item slot that was next to the potion by mistake. Thank you for the help 🙂

Original thread: https://forums.rpgmakerweb.com/threads/getting-a-typeerror-after-a-random-encounter.125285/