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

Font Style Error

Community Beginner ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

Hi again guys 🙂

 

I have been using one expression for a few months and worked fine, but I just tried it in another project and I am receiving an error which I don't understand.

 

I a trying to 'copy' the style of layer 'A' and be read by layer 'B'. However, a 'style error' is appearing and I don't know why, because is the sae expression I used in other projects...

Screenshot_error_1.jpg (I attached the screenshot in case this one has no quality)

 

Here is the code I used:

sl=effect("Slider Control")("Slider");
if(effect("Up/Down")("Checkbox")==1){
	Tt=sl-time+1;
}else{
	if(time<sl){Tt=time}else{Tt=sl}
}
sec=Math.floor(Tt%60);
min=Math.floor(Tt/60);

function Zero(n){
if(n<10) return ("0"+n) else return n;
}

if(Tt>0){
Zero(min)+":"+Zero(sec)}
else
{"00:00"};

txt = thisComp.layer("FONT").text.sourceText.style;
style.setFont(txt.font).setFontSize(txt.fontSize).setText(sl)

 

I hope you guys can help me, thank you!

TOPICS
Error or problem , Expressions , FAQ , Freeze or hang , How to

Views

133

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

LATEST

check whether you have the modern JavaScript engine enabled in the Project settings. The legacy engine won't handle this stuff and in an older project it would be saved as the default.

 

Mylenium

Votes

Translate

Translate

Report

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