## Adobe Community

• Global community
• Language:
• Deutsch
• English
• Español
• Français
• Português
• 日本語コミュニティ
Dedicated community for Japanese speakers
• 한국 커뮤니티
Dedicated community for Korean speakers
Exit
• Expression shows error

# Expression shows error

Contributor ,
Dec 07, 2022 Dec 07, 2022

Copied

Hello,

I am following one tutorial 'VERBATIM'. I applied the same expression as my tutor used. but he got no error, I got. :'( why? TOPICS
User interface or workspaces

Views

300

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more ## 1 Correct answer

Community Expert , Dec 07, 2022 Dec 07, 2022

There is no Math.Pl function. It's Math.PI

Try this:

``````n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--
}
}
if (n == 0){
t = 0;
}
else{
t = time - key(n).time;
}
n = nearestKey(time).index;
if (n > 0 && t < 1){
v = velocityAtTime(key(n).time) - thisComp.frameDuration / 10;
amp = .45;
freq = 4.0;
decay = 8.0;
value + v * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t);
}
else {
value;
}
``````

When you have problems with an expression, it is a

... 2 Replies 2
Community Expert ,
Dec 07, 2022 Dec 07, 2022

Copied

There is no Math.Pl function. It's Math.PI

Try this:

``````n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--
}
}
if (n == 0){
t = 0;
}
else{
t = time - key(n).time;
}
n = nearestKey(time).index;
if (n > 0 && t < 1){
v = velocityAtTime(key(n).time) - thisComp.frameDuration / 10;
amp = .45;
freq = 4.0;
decay = 8.0;
value + v * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t);
}
else {
value;
}
``````

When you have problems with an expression, it is a good idea to use the toolbar's </> tool to post the expression.  When you have problems with a tutorial, it is always helpful to post a link to the tutorial. Unfortunately, most of them are presented by enthusiasts, and the workflows and explanations can be a little sketchy.

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more Contributor ,
Dec 07, 2022 Dec 07, 2022

Copied

LATEST

Thank you so much. I will remember what you said. Thank you.   