• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error 1084 & 1086

Participant ,
Feb 24, 2017 Feb 24, 2017

Copy link to clipboard

Copied

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.

Views

181

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Feb 24, 2017 Feb 24, 2017

I seem to have fixed it.

For anyone else who may get this issue;

I deleted the dynamic text field, drew another and named it the same. All works fine now!

Votes

Translate

Translate
Participant ,
Feb 24, 2017 Feb 24, 2017

Copy link to clipboard

Copied

LATEST

I seem to have fixed it.

For anyone else who may get this issue;

I deleted the dynamic text field, drew another and named it the same. All works fine now!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines