Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Array indexOf() Reference Error?

$
0
0

Hello,

 

I have these simple code lines and on line 20 I'm getting the error in the comment but I cant find the problem in my code

 

  var directions      = [0,1,2,3];  var lockedDirection = 0;  var lastDirection   = 2; // sample code  switch (lastDirection) {  case 0:       lockedDirection = 2;       break;  case 1:       lockedDirection = 3;       break;  case 2:       lockedDirection = 0;       break;  case 3:       lockedDirection = 1;       break;  };  var a = directions.indexOf(lockedDirection); // ReferenceError: Function directions.indexOf is undefined  directions.splice(a, 1);

Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>