1 Reply Latest reply on Feb 24, 2017 2:29 PM by jackh8500410

    Error 1084 & 1086

    jackh8500410 Level 1

      Hi all,

       

      On my second question frame I have a dynamic text field (pLvl1Qu2txt) which seems to be the cause of the error 1086 and 1084. When I delete the dynamic field, it gives me an error to say its missing instead of the errors above.

       

      The location of the problem is on layer 'test', frame 20. I don't have any script on the test layer, its all in the actions layer.

       

      The code on the actions layer is;

      //random numbers between 10 - 20 for question

      var pLvl1Qu2RanNu1: Number = 10 + Math.floor(Math.random() * 11);

      var pLvl1Qu2RanNu2: Number = 10 + Math.floor(Math.random() * 11);

       

      //question

      pLvl1Qu2txt.text = "You have been given £" + pLvl1Qu2RanNu1 + ". How much more do you need to get £" +  pLvl1Qu2RanNu2 + "?";

       

      //on click, check answer

      btnPLvl1Q2Check.addEventListener(MouseEvent.CLICK, pLvl1Q2Check);

       

       

      function pLvl1Q2Check(event: MouseEvent): void {

        if (pLvl1Ans2.text == pLvl1Qu2Equal) {      //pLvl1Ans2 is what the user inputs

        pLvl1Ans1Text.text = "Well done! You got it right!";

        pLvl1AnsStar2_mc.visible = true;

        pLvl1Ans2Text.visible = true;

        pLvl1S2_mc.visible = true;

        btnPLvl1Q2Check.visible = false;

        btnPLvl1Qu2Next.visible = true;

        } else {

        pLvl1Ans2Text.text = "Sorry! You got it wrong this time!";

        pLvl1AnsStar2_mc.visible = true;

        pLvl1Ans2Text.visible = true;

        pLvl1SadS2_mc.visible = true;

        btnPLvl1Q2Check.visible = false;

        btnPLvl1Qu2Next.visible = true;

        }

      }

       

      The full errors are:

      plusLvl1, Layer 'test', Frame 301086: Syntax error: expecting semicolon before multiline.
      plusLvl1, Layer 'test', Frame 301084: Syntax error: expecting rightbrace before semicolon.