"undefined for NIL" always means that the engine is missing a data object.
why that data object is missing depends on what script was tried to execute, and what data it could have been ordered to use.
possibilities are:
1) you deleted something in your database
2) a new script requires a database entry that you haven't put into the database
3) you're using an older and now incompatible savefile - always test by starting a new game after a script is added or removed.
4) incompatibility between two scripts you added.
Could this be caused by an empty common event? I forgot to mention this happens when pressing "New Game"
then it is most likely a script that has been configured wrong.
whenever you add a script, you need to configure it to fit your specific game - the script developer had a different game to test, and the default settings are often wrong for other games.
OH WAIT I'M AN IDIOT
It happened because of a removed script, I had a script that let the user have a Discord Rich Presence, but I removed that due to another bug.
I actually haven't checked this but it's the most probable.
a removed script can only affect your older savefiles, if it was removed correctly then any new game playtests will NOT be affected.