Text coloring issues for long strings - turning entire working script purple

Using a windows 10 PC, some visual colors of text will sometimes color entire parts of a working script as if it were a string in the Script Editor. In the images below I have a very large table list of strings
(~1.1k entries, I used long strings for each one so I could use find and replace rather than manually do it), with each one being properly closed (I checked myself). However it colors the rest of the script as if it were a string, however the script runs normally. I’m not sure about the specifics of this case or how exactly I got it like this, but copying and pasting the script produces the exact same results.
Restarting studio has no effect.
Adding an additional long string end will rectify the issue, but produce an error, as the script has a syntax error.



Link to the script with the issue to replicate the error.
https://pastebin.com/nEuBn4wz

2 Likes

I am not familiar with the use of double brackets, but after using CTRL+F and searching for “[[” and “]]” it shows that you have 1389 “[[” and only 1388 “]]” meaning you must be missing “]]” somewhere. You can make a script or java program that inserts that and checks for a spot where there is a “[[” that doesn’t have a “]]” before the next set of “[[”.

Found:

Line 229, agreement needs 1 more bracket.

1 Like

So when I added the extra bracket, the coloring issue still remained until I cut and paste the script again