tags:

views:

211

answers:

2

I have a CF-7 file with 30 line of code.I am getting an error on the 31st line saying

             ** Invalid token '\n' found on line 31 at column 0.**

what does the error message mean?

Regards

Vas

+1  A: 

There is a new line character at the beginning of the line. Is whatever you are using to parse the file is not expecting an empty line?

Jerry Bullard
+8  A: 

The error is slightly misleading. The CF compiler is trying to parse the code but failing because of a unclosed tag / block so it keeps on trying to parse until the end of the document and then it reports the error since the last thing it found was a newline which isn't closing the tag that's currently open. So go over the source code and check where you aren't properly closing something. The error is before line 31.

it could be something like

<cfif foo eq "Bar">
  Still haven't found what I'm looking for.

and then not having a closing tag. Or it could also be you have a CF style comment

<!--- but are closing it as a HTML comment -->
olle
I have commented two lines and I was hitting this error.I had skipped space for end comment "--->" instead of " --->".So the error.Corrected it and working fine
vas
+1 for psychic debugging
Kip
hehe thanks very much.
olle