There are four main ways of defining a string in Lua:
A. Using double quotes:
local myString = "This is a string"
B. Using single quotes:
local myString = 'This is a string'
C. Using two square brackets:
local myString = [[This is a string]]
D. Using two square brackets and an equal sign in between:
local myString = [=[This is a string]=]
Now, A and B are pretty much the same. C and D are pretty much the same too, but they are different than A and B. A and B are called
single-line strings and C and D are called
multi-line strings. When you define a string using A or B, the string definition must be in one line and all special characters must be escaped (ex.: \n, \", \', etc..). When you define a string using C or D, you don't have to escape some special characters, like " or '. Also, multiline can span multiple lines and all the line breaks in the multi-line string are also converted to \n.
To put it in an example, here is the same string defined with all these four methods:
s = "This is a \" string ' with some special characters and \n new lines"
s = 'This is a " string \' with some special characters and \n new lines'
s = [[This is a " string ' with some special characters and
new lines]]
s = [=[This is a " string ' with some special characters and
new lines]=]
I hope you can see your problem now :)/>