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

Misses/Guesses game Not working properly

New Here ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

I used a tutorial on creating a misses/guesses simple game.  But when a letter is typed that's not in the word bank, it doesn't show.  Also, when a letter is incorrect, it doesn't go in the misses section.  What am I missing? 

TOPICS
ActionScript

Views

246

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

LEGEND , Apr 27, 2015 Apr 27, 2015

Then move it after the closing parenthesis of that else conditional.  Until you can explain what the else if conditional is supposed to do you oughta get rid of it.  You might eventually realize what you really want it for after it's gone and can repair it to do that.

Votes

Translate

Translate
LEGEND ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

Without showing the code you are using and explaining what it is supposed to do it is next to impossible to say what you might be missing.

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
New Here ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

You are correct - how can I share the code?

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
New Here ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

I've made screenshots of the code - thanks for your help1

misses.guesses1.jpgmisses.guesses2.jpgmisses.guesses3.jpgmisses.guesses4.jpg

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
LEGEND ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

that whole section of

    else if(guesses_txt.text == "")

    ....

    }

appears to be doing nothing as far as writing any text... if it is empty why try to append its emptiness to itself?

the line

    guesses_txt.appendText(","+guess.text);

should not be inside the else conditional as far as I can tell.  Don't you want it to enter the guess regardless if it is right or wrong?

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
New Here ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

That's what I was trying to do.  Yes, I want it to enter the guess if right or wrong.

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
LEGEND ,
Apr 27, 2015 Apr 27, 2015

Copy link to clipboard

Copied

Then move it after the closing parenthesis of that else conditional.  Until you can explain what the else if conditional is supposed to do you oughta get rid of it.  You might eventually realize what you really want it for after it's gone and can repair it to do that.

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
New Here ,
Apr 28, 2015 Apr 28, 2015

Copy link to clipboard

Copied

LATEST

Thanks I'll try that.

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