cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Scripts encounter mysterious missing " ; " error even on 1st line of code.

bbean
8-Gravel

Scripts encounter mysterious missing " ; " error even on 1st line of code.

As the title says my scripts will error our because of a missing " ; " even if the 1st line of code comes after comments, or is the 1st line in the file. Have to type new scripts pretty much completely by hand. It will allow me to paste small code chunks eventually, but it makes it difficult to tell the difference between this error and an actual missing " ; ".

Anyone advice for a fix or work around?

3 REPLIES 3
LLawton
14-Alexandrite
(To:bbean)

Is this a Windows or Unix system? Make sure the trigger script's file is of the right type and format.

If you have copy/pasted code in it, make sure there are no invisible characters in there. I've had that happen to me when copying from a pdf file.

Otherwise it's hard to diagnose without a close inspection of your file.

bbean
8-Gravel
(To:LLawton)

Windows.

I use all .js files for my trigger scripts, but I'm not sure if there is a specific PTC format I should be using.


My 1st suspicion was the invisible characters as well. I checked that out using an online hidden character tool, with no results.

LLawton
14-Alexandrite
(To:bbean)

There's no specific PTC format, it's ECMA JavaScript in text file.

I'll have a quick look if you can send me a sample.

Top Tags