6 Replies Latest reply on Aug 21, 2012 10:48 AM by BenjaminMarkus

    creating a single variable from a simple formula

    Lewiz Level 1

      Hi guys,

      I'm ploughing my way through the basics of expressions, constantly running into syntax errors as I still haven't found out the logic behind it all. It is still a great mystery to me when to use spaces, [ ] { } and ( ) not to mention =.

      I was trying to create a variable called "y" from a simple formula. My scripting looks like:


      veloc = 3;

      amplitude = -5;

      decay = 0;

      y = amplitude*Math.sin(veloc*time)/Math.exp(decay*time);



      But whatever brackets and things I put around this formula, whatever spaces or newlines, somehow AE doesn't accept it. When I replace the formula for a wiggle, the fifth line is accepted, and when I replace the "Y" in the fifth line for "value" there are no errors, so obviously AE considers the formula not valid. What is the difference between the output that wiggle(,) gives and the output of this formula? How should I write this expression? Is there any website resource where the logic behind the bracket, spacing, newline, order etc. of this script language is demystified? And I mean really at basic, really baby level. I am pretty good at maths, but the programming hieroglyphs and their secret rules still don't make sense to me.


      Any help is greatly, greatly appreciated.