MV SOLVED Yanfly plugin Event summoner error $game_map is not defined

I was trying to use the event summoner plugin from Yanfly to create a simple bullet effect in my game but it keeps giving me this error. I'm unable to figure out how to fix it. Please help.
Moved to: Plugin Support

Yanfly's Event Spawner plugin doesn't even have $game_map (or $gameMap which is the correct syntax for MV).

I don't think this error comes from that plugin, and as it's Ace syntax, I suspect it's more likely to be a script call you've put in your game.

Please generate the error, then hit F8 to open the Developer Tools window. Go to the Console tab, and take a screenshot of the error message and post it here.
Here's that. Still, a bit lost on what to do but hoping this helps.
1629283865889.png
That looks like you've typed script into one of your event move routes that contains the erroneous syntax.
That looks like you've typed script into one of your event move routes that contains the erroneous syntax.
Oh my god, I feel like an idiot. I just checked through my events and I did put a the script

"$game_map.events[1].erase" in the bullet event. Fixing that now! Thank you!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-yanfly-plugin-event-summoner-error-game_map-is-not-defined.139695/