I’ve come across a very similar error myself, and it is at those times I have learned to take a step back and re-analyze what files I am using. Typically it means that something is “locked” for access to us modders, but we have found a portion of that locked code that was exposed.
Usually it is something very simple like a single check mark that was missed/added where it shouldn’t be. Your best bet is to back track and try to find an area where you made a mistake.
On that note, what has been your process so far?