After Effects script error...bug?
Hi,
I'm trying to create a countdown-timer in Adobe After Effects using this script attaching it to the source text property of a text layer:
- - - - - - - - - - - - - -
rate = -1;
clockStart = 300;
function padZero(n){
if (n < 10) return "0" + n else return "" + n
}
clockTime = Math.max(clockStart + rate*(time - inPoint),0);
t = Math.floor(clockTime);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
min + ":" + padZero(sec)
- - - - - - -
However, I can't get it to work (my text just disappears) and there is an error message:
This project contains an expression error: Error 1 of 1
Some sites suggest you can click the symbols on the right of the orange warning banner with this message but it just flashes for half a second before it goes away. Only way I can initiate it is by changing a value in the script and click outside of the script area but as soon as I release the mouse the error message goes away.
Could this be a bug? Not knowing whats wrong with the script and not even able to learn more about it using the error-banner gives me little luck in finishing this countdown-timer with the accompanying script (or using any script for that matter if it's not imediately correct).
Any help greatly appriciated.
I'm in Adobe AfterEffects CC 2019
