Error: Syntax Error: Unexpected token else
Copy link to clipboard
Copied
Hola soy nuevo en after effects y tengo un problema con esta expresión
velocidad=1;
contadorInicial=TuDeslizador*60;
tiempoContador=Math.floor(contadorInicial - velocidad*time);
minutos=Math.floor(tiempoContador/60);
segundos=tiempoContador%60;
if (tiempoContador > 0 && time < tiempoContador){
Cero(minutos) + ":" + Cero(segundos);
} else ("00:00");
function Cero(n){
if(n<10) return "0" + n else return n;
}
siendo especifico en esta parte
if(n<10) return "0" + n else return n;
mi after effects dice: Error: Syntax Error: Unexpected token else
Copy link to clipboard
Copied
You are not using the correct brackets or for that matter not any brackets at all. All branching statemnts must be enclosed in curly brackets, not parentheses and those rules are even stricter when using the new engine. You really need to work on making your syntax cleaner.
Mylenium

