You don't have a line 36, which means that you haven't posted all your script, which means that we are going to struggle to help.

If your script is too large to post then isolate the problem in a smaller test script, and post that.

The error message suggests that it is likely that you have missed a quote character somewhere else in your script.

Other reasons for this type of error include undefined functions, incorrect parameter specification and mis-handling of objects. It's probably the quote character though.