Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Countdown clock expression error

  • Countdown clock expression error

    Posted by Andrew Ross on May 1, 2026 at 2:52 pm

    I could do with some help on this countdown clock please.

    I’ve got a script off the internet but it’s kicking up an error and I’m not sure why…

    This is the section of expression

    // Round to whole numbers and add zero padding

    for (i in f){ f[i] = String(Math.floor(f[i])).padStart(i>2?3:2, “0”) }

    and this is the error message

    The error reads : Error at line 17 ‘Source Text’ of layer 1(‘Timer’) in comp ‘Comp 17’. String ().padStart is not a function.

    w

    I hope you can help. Many thanks in advance.

     

    Tim Garber replied 1 week, 2 days ago 4 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    May 1, 2026 at 3:09 pm

    Can you post the whole expression (or a link to where you got it)?

  • Dan Ebberts

    May 1, 2026 at 3:44 pm

    My guess, based on the error message, is that you have the expression engine set to Legacy Extendscript. Try:

    File > Project Settings > Expressions > JavaScript

  • Andrew Ross

    May 7, 2026 at 9:42 am

    Hey Dan! Yep, that did it. Thank you

  • Brie Clayton

    May 7, 2026 at 1:32 pm

    Thank you, Dan!

  • Tim Garber

    July 7, 2026 at 10:08 pm

    That gets me everytime I jump on a new machine.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy