MV [SOLVED] (Script) Find Event ID by Event Name

There is certainly something weird going on here - as Turan mentioned, you really shouldn't be getting a syntax error on => here, even if that script was incorrect. Maybe the nwjs version is lower that it should be for whatever reason?

Can you type process.versions in console, click the triangle next to the result to expand it, and screenshot that?
That can't have anything to do with it.

What @Mac15001900 gave you is correct JavaScript syntax - a plugin can't be "not compatible" with it.

I've seen the error you posted from other people using older versions of MV that didn't support the syntax for arrow functions. If you're using 1.6.1, I have no idea why it's saying that.
I opened and closed the RPG Maker and for some reason it works now.
Y'all thank you for your patience. :eswt: The code of Mac15001900 works fine.

@J0h3l, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. 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-script-find-event-id-by-event-name.168413/