Error: Effect named is missing or does not exist

New Here ,
Sep 05, 2022 Sep 05, 2022

Copy link to clipboard

Copied

Hey all, I require a bit of a assistance and have been a bit stumped by an error which I'm getting on a project that I've been working on. I'm trying to create a MOGRT with selection controls but have been getting an error which states:

"After Effects warning: Expression disabled. Error at line 30 in property 'Opacity' of layer 12. Error: effect named 'Player Selection' is missing or does not exist. It may have been renamed, moved, deleted or the name may have been mistyped."

 

layers.PNG

Here is the code below, which, as far as I can see, is all correct. All the layers are named right and spelt right so i'm not entirely sure as to why I'm still getting this error pop up.  My language knowledge is amateur at best so it might be something really simple. 

 

thisComp.layer("CONTROL").effect("Player Selection").compositingOption.effectOpacity

player_selection = thisComp.layer("CONTROL").effect("Player Selection")("Menu");
player = Math.floor(effect("Player Selection")("Menu"));
t = 0;
if(player == player_selection){
t = 100
}
else{
t = 0
}

t

 

Any help would be absolutely appreciated, thank you. 

 

 

TOPICS
Expressions , Scripting

Views

47

Likes

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
Community Expert ,
Sep 05, 2022 Sep 05, 2022

Copy link to clipboard

Copied

It might help to see the whole expression. What is the first line supposed to be doing? (BTW, you should add a semicolon to it, just to avoid trouble).

Likes

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
New Here ,
Sep 30, 2022 Sep 30, 2022

Copy link to clipboard

Copied

LATEST

Hello friend, I have solved this problem,but the reasons may be different. Here is the solution. when i search my project files. I just found two identical composition with the same name. when I change one of the names. The error just disappeared. Hope it helps. Have a nice day.

Likes

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