-
syntax error??
Hi i’m kind of new to this whole expressions thing. So i obtained a code to use as a counter. Meaning like to count from 1 to 25 for example.
Well this is what i did. I had the text layer and selected the source text and added an expression from the animation menu. But when i inserted the code and modified the numbers and tried to run it i got an error. It said there’s a missing bracket “)” in line 6.
This is the code:
var targetValue = 32; // final desired value
var startShift = 25; // frames to skip before starting
var display = 0; // starting value to displayvar internalTime = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
if (internalTime – startShift > targetValue) {
display = targetValue;
} else if (internalTime – startShift < 0) {
display = 0;
} else {
display = internalTime – startShift;
}
display;Please help me sort out the problem and sorry for my ignorance in expressions.