I am trying to use this code that my teacher gave me for this project we are working on, and I keep getting an error in one of the lines. It says "expression error 1 of 1", "After Effects Warning: Expression Disabled, Error at line 3 in property 'Time Recap' of layer 2 ('bar1') in comp 'dynamic data' Syntax Error: Invalid or Unsuspected Token"
The following is line 3:
chartMax = thiscomp. layer (“chartcontrols”). effect(“maxvalue”) (“slider”);
The grammar, capitalization, and everything is correct so I don't know what is wrong with it. I copied it directly from my teacher so I don't know why it worked for him and not me.
The quotes are wrong.
Okay, so how do I fix it?
Update: Now it is saying the same for my first line, but the third line is somehow not an issue anymore? I am trying to get ahold of my teacher, but he won't respond.
InputVal = effect(“barvalue”) (“slider”)/100;
PLEASE HELP ME I AM STUCK ON THIS ASSIGNMENT AND ITS DUE TONIGHT
It says on line 1 that I have an invalid or unexpected token.
Please give me a detailed response; I am new to this and have no idea what I am doing.
InputVal = effect(“BarValue”) (“Slider”)/100;
chartMax = thiscomp. layer (“chartcontrols”). effect(“maxvalue”) (“slider”); AnimationCompletion=effect(“Percentage”)(“slider”);
ratio=AnimationCompletion/chartMax; Length=100; // number of frames for animation Inputval*Length*thiscomp.frameDuration*ratio:
The bad quote marks come from copying text from a document instead of typing it in the Expression field.
The second and third lines have extra spaces, and the "s" in the effect controls portion of the expression is not capitalized (again, from copying text instead of typing it in and watching the auto complete do things right for you or using the Pickwhip.
The fourth line is two operations. It should be two lines breaking at the semicolon.
The last line returns a value of 100.
Even if you fixed all of the errors in the expression, the only value that it would generate would be 100. You might as well have just started the expression and entered 100.
What is the expression supposed to do? What property are you trying to control? I'm not going to fix the typos and just have you copy and paste. I suggest you start typing and pay attention to the prompts. Use the Pickwhip to point to the Expression Control Slicers, and you can easily remove the errors, but you can't get the expression to return any value except 100 unless you add a bunch more code.