[Resolved] Event causes number input dialogue

I made a box of gold that's protected by a ghost. When you click on the box of gold it empties and engages the player in a battle. When the battle is won, the box fills back up with gold. This event works on one of my maps. However, on a duplicate map, upon exiting the battle, a dialogue box appears that has a single digit input option. It does nothing, and wont go away for anything. This is my first post on this forum so I'm not sure how this format will come out but here are some screenshots of the event and the map.
most likely you have another event that is triggered by the same switch you're using here, switch 21
Please search for the other uses of that switch and change one of the two events to w different switch.

And in the future, remember the most important rule: whenever you use a switch or a variable, always name it first - this will not only tell you what it is used for, but it will also tell you that it is already used and prevent you from using it elsewhere because you forgot to name it on the first use.

This includes checking new plugins for what switches or variables they might use to configure them correctly.
I moved the battle processing to the bottom of the list on the event page. That fixed it.

Original thread: https://forums.rpgmakerweb.com/threads/resolved-event-causes-number-input-dialogue.78466/