Incorrect arguments for (+=)

I am writing a script that will create an HTML file based on text in a baseline.  I have the following code in a function called writeNewTable.  What this function is supposed to do is create a new row in an already-created table.  However, when I try to run the script, I am getting the error "incorrect arguments for (+=)" for multiple lines.  Here is the associated code that is getting flagged.

htmlBuffer = "<tr>\n";
htmlBuffer += "<td class='myCell'><span style='color:blue'>NEW TABLE</span></td>\n";
htmlBuffer += "<td class='myCell'><br></td>\n";
htmlBuffer += "<td class='myCell' style='color:blue'><u>";
htmlBuffer += "<table cellpadding='0' cellspacing='0' width='100%'>\n";

In another function, I have the following similar code that is NOT getting flagged with an error:

htmlBuffer = "<tr>\n"
htmlBuffer += "<td class=\"myCell\">Table" oTable."AbsoluteNumber" "\n</td>"
htmlBuffer += "<td class=\"myCell\"/>\n"
htmlBuffer += "<td class=\"myCell\">\n"
htmlBuffer += "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"

Besides using single quotes instead of escaping the double quotes, can anyone please tell me what I am doing wrong in the first code snippet that is correct in the 2nd one?  I have counted all of my quote marks to make sure they all match up, but I am not seeing what my issue is.

 

Chris Cote


Christopher Cote - Tue Oct 11 15:03:03 EDT 2016

Re: Incorrect arguments for (+=)
DOORSHAM - Tue Oct 11 15:21:34 EDT 2016

NEW TABLE looks like possible problem

Re: Incorrect arguments for (+=)
Mike.Scharnow - Tue Oct 11 16:57:46 EDT 2016

I would say that in the first snippet htmlBuffer is declared as string (or not declared at all) and in the second one it is a Buffer