This isn’t a 2D script error, it’s a generic Script error and as such, the most appropriate forum would be the Scripting or Getting Started forum. I’ll move your post for you.
Please use the 2D forum when asking and discussing 2D features.
Finally, please edit your post to use code-tag s; don’t use plain text for code.
Thanks.