open file error in BBEdit

I have a script that makes some HTML, but that HTML ends up being pretty messy. I just found the format command in BBEdit that makes everything nice and clean. However, when the script tries opening the HTML file I get an error saying “Path:to:HTML:file.html” doesn’t understand the open message. I have a variable that holds the path to the HTML file and a variable that holds the fileName I concattenate everything together and get this error. When I hard code the path for a specific file it works fine. When I hard coded the path the path was exactly the same as when it got the path from the variables. Does anyone know what’s going on here? Please help if you can. Thank you.

We’d have a much better chance of helping you if you posted some sample code. Then we could see if anything obvious is wrong.