Thank god for code folding
And this is nothing compared to the thousands of lines of code this project will one day have :')
And this is nothing compared to the thousands of lines of code this project will one day have :')
Posting this for anyone who may need it in future, because I searched up solutions and found almost nothing
My game was running perfectly until it wasn't, but not because of a programming error. If you get the same error or one similar, the culprit is likely anti-virus or Windows Smart App Control (SAC) blocking a runtime file. For me this was FileIO.dll
To fix this: Windows Security > Virus & threat protection > Manage settings (under Virus & threat protection settings) > Add or remove exclusions (under Exclusions) > Add an exclusion > Folder > C:\ProgramData\GameMakerStudio2
Also add an exclusion for C:\Users\[User]\AppData\Local\GameMakerStudio2
AppData is hidden by default on Windows, so if you can't find it: File Explorer > View > Show > Hidden Items OR just copy and paste the path directly (and add your username). You may need to restart GameMaker after this, but I was able to run my game without restarting.
And, finally, if you don't download software from questionable sources, you can disable SAC: search Smart App Control > Off (just know that re-enabling it can be a pain)
Happy developing!