1 Reply Latest reply on Nov 10, 2006 12:19 PM by Newsgroup_User

    Help please with a script error

    linzi007
      I have the following error

      **Error** Scene=Scene 1, layer=actions, frame=1:Line 47: Unexpected '}' encountered
      } // end while

      Can anyone tell me how to fix - script is this;

      TotalRubs = "7";
      RubHeight = getProperty("Rub", _height);
      SubrubHeight = getProperty("Subrub", _height);
      LabelRub1 = "I";
      Total_Subrubs_Rub1 = "2";
      LabelRub1_Subrub1 = "Subrub1";
      LabelRub1_Subrub2 = "Subrub2";
      LabelRub2 = "am";
      Total_Subrubs_Rub2 = "3";
      LabelRub2_Subrub1 = "Subrub1";
      LabelRub2_Subrub2 = "Subrub2";
      LabelRub2_Subrub3 = "Subrub3";
      LabelRub3 = "learning";
      Total_Subrubs_Rub3 = "5";
      LabelRub3_Subrub1 = "Subrub1";
      LabelRub3_Subrub2 = "Subrub2";
      LabelRub3_Subrub3 = "Subrub3";
      LabelRub3_Subrub4 = "Subrub4";
      LabelRub3_Subrub5 = "Subrub5";
      LabelRub4 = "to";
      Total_Subrubs_Rub4 = "4";
      LabelRub4_Subrub1 = "Subrub1";
      LabelRub4_Subrub2 = "Subrub2";
      LabelRub4_Subrub3 = "Subrub3";
      LabelRub4_Subrub4 = "Subrub4";
      LabelRub5 = "create";
      Total_Subrubs_Rub5 = "2";
      LabelRub5_Subrub1 = "Subrub1";
      LabelRub5_Subrub2 = "Subrub2";
      LabelRub6 = "awesome";
      LabelRub7 = "menu";
      n = "0";
      while (n < TotalRubs)
      {
      n = n + 1;
      duplicateMovieClip("Rub", n, n * 10 + 16384.000000);
      if (n == 1)
      {
      YPosition = "30";
      }
      else
      {
      YPosition = getProperty(n - 1, _y) + RubHeight;
      } // end if
      setProperty(n, _y, YPosition);
      set(n add ":Label", eval("LabelRub" add n));
      } // end while
      setProperty("Rub", _visible, "0");
      setProperty("Subrub", _visible, "0");

      Any help will be useful

      Cheers