Expected expression, got ','

Hi,

if I try to run a Javascript code I get the above syntax error. The relevant portion of the script looks like this

case "Left_Voiced": {
    if (prez.PosVoiced>1) {
        prez.object('Voiced').translateBy(-108,0);
        prez.PosVoiced--;
        prez.SolVoiced = prez.ArtVoiced[prez.PosVoiced-1];
        };
    };   
    break;

},
function(e, prez) {

None of my two scripts seem to contain the “},”. Where does that come from? The script worked just fine. Then I added something which didn’t work and I deleted it again. Now I get this syntax errror.

Best,

Rolf

Hi Rolf,

It looks like your code is missing a closing bracket } for the switch case statement.

User scripts will be wrapped into functions when exporting, so you see }, in the output file. But you don’t need to care it, just correct your scripts in the editor.

Regards

omg, that’s embarassing, sorry, Rolf