simple loop, big problem


    Dec 19 2013 | 8:17 pm
    Hi everybody,
    I've just begun to work with Js and I'm an absolute noob, so
    I can't figure out why this simple loop doesn't functions.
    Any advice would be precious
    thanks
    Matteo

    • Dec 19 2013 | 8:30 pm
      Hi Matteo,
      Can you paste in your JS code? It doesn't get saved with the patcher, so in your patch, the JS object is empty.
      -Ben
    • Dec 19 2013 | 8:37 pm
      Ouch..I'm sorry
      Here It is
      Thanks
      function list() {
      var delta = new Array();
      for (i = 0; i < arguments.length; ++i) {
      if (i = 0)
      delta[0] = arguments[0];
      else
      delta[i] = arguments[i] - arguments[i-1];
      }
      outlet(0, delta);
      }
    • Dec 19 2013 | 8:56 pm
      Ok...It was really stupid, in the if statement I'v assigned and not checked i