Hello. For some reason I am getting an error when I save after a certain event. This is the Error.

I am using this script.
View attachment New Text Document.txt

I am using this script.
View attachment New Text Document.txt