6 Replies Latest reply on Sep 2, 2016 12:37 PM by Roei Tzoref

    setting source text displaying wrong char at index 0

    harryk86160331 Level 1

      There is some bug i just can't figure it out. I have the following code on the Source Text property of a text field:

       

      A="";

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

           A+=(random()>0.5 ? "0" :"1")+"\r";

      }

       

      It should be creating a random vertical text of randomized 1's and 0's like so

       

      0

      1

      1

      0

      1

      0

      0

      0

      1

      0

       

      But there is some bug in after effects that it displays the first character as a dot. it makes no sense...

       

      .

      1

      1

      0

      1

      0

      0

      0

      1

      0

       

      If the loop is i < 9 then the character is a colon. Am i declaring the "A" variable incorrectly?