Skip to main content
liuzhenyilzhy
Participating Frequently
May 30, 2018
Question

expression error:property or method named in class array is missing or does not exist.

  • May 30, 2018
  • 1 reply
  • 3938 views

hi,my friends,

I from china,

it is unfortunately,my english is poor.

so,there are many mistake in this post.

like this,words or grammar is wrong.

I am sorry.

I meet an expression error:property or method named in class array is missing or does not exist.

It saids:

=================================

after effects warning:

expression disabled.

error at line 35 in porperty 'source text' of layer 1(bfs) in comp 'biaodashibenfen 2'.

property or method named '0' in class 'array' is missing or does not exist.

it may have been renamed,moved,deleted,or the name may have been mistyped.

==================================

please look the picture.

expression is below the==============

==============

l=thisComp.layer("peilai");

ain=0;

bout=100;

p=l.transform.position;

c=bout-ain;

dqz=time/thisComp.frameDuration;

ps=[];

mzjls=[];

dqjls=[];

bfs=[];

    if(dqz<ain){

    idq=0;

}

if(dqz>bout){

    idq=0;

}

else{

idq=dqz-ain;

for (i=0; i<=c; i++) {

    d=(ain+i)*thisComp.frameDuration;

    ps=p.valueAtTime(d);

    if(i>=1){

    mzjls=length(ps[i-1], ps);

    dqjls=dqjls[i-1]+mzjls;

}

else{

    mzjls=0;

    dqjls=0;

}

}

for (i=0; i<=c; i++) {

    bfs=100*(dqjls/dqjls);

}

}

bfs[idq].toString();

===========================

the line 35 :

bfs[idq]

maybe is wrong.

But I dont know why is wrong?

How can I fix it?

Thanks a lot!

This topic has been closed for replies.

1 reply

liuzhenyilzhy
Participating Frequently
May 30, 2018

l=thisComp.layer("peilai");//layer

ain=0;//inpoint frame

bout=100;//outpoint frame

p=l.transform.position;//porperty is position

c=bout-ain;//duration

dqz=time/thisComp.frameDuration;//current frame

ps=[];//points set or called array

mzjls=[];//distance of two near point:length(ps[i-1], ps)

dqjls=[];//the length in this path of current point and starting point

bfs=[];//the percentage of (the length in this path of current point and starting point) div (the length of the whole path)  set

    if(dqz<ain){

    idq=0;//idq is index of current frame in the set

}

if(dqz>bout){

    idq=0;

}

else{

idq=dqz-ain;//idq is index of current frame in the set

for (i=0; i<=c; i++) {

    d=(ain+i)*thisComp.frameDuration;// the time of current frame

    ps=p.valueAtTime(d);//value of position in current frame

    if(i>=1){

    mzjls=length(ps[i-1], ps);//distance of two near point:length(ps[i-1], ps)

    dqjls=dqjls[i-1]+mzjls;//the length in this path of current point and starting point

}

else{

    mzjls=0;

    dqjls=0;

}

}

for (i=0; i<=c; i++) {

    bfs=100*(dqjls/dqjls);//the percentage of (the length in this path of current point and starting point) div (the length of the whole path)

}

}

bfs[idq].toString();//the percentage of current frame