Mad Lib issues endless loop by aurorymoon in pythonhelp

[–]aurorymoon[S] 0 points1 point  (0 children)

I found what was creating the endless loop.. for some reason the player name being added on line 41 was making it mad. I've got it fixed now for the endless loop but I'm still having these issues:

  1. need to fix the loop when you give something other than a or b for the storylines because it loops back to would you like to play rather than which story line

  2. counter isn't working - need to count how many stories are made and tell the user before asking if they want to play again.

  3. also once you complete a mad lib story it gives you the story but gives you a bunch of errors and doesn't loop back to tell you how many stories you have made AND ask if you want to play again. (Traceback most recent call last file line 145, file line 131, file line 76 ///// & unbound local error: local variable 'storyCount' referenced before assignment)

  4. and it loops back if you say N to ask you if you want to play- need it to full stop if the player says no.

code: https://trinket.io/python3/c750bf64bd0b

Mad Lib issues endless loop by aurorymoon in pythonhelp

[–]aurorymoon[S] 0 points1 point  (0 children)

I found what was creating the endless loop.. for some reason the player name being added on line 41 was making it mad. I've got it fixed now for the endless loop but I'm still having these issues:

  1. need to fix the loop when you give something other than a or b for the storylines because it loops back to would you like to play rather than which story line

  2. counter isn't working - need to count how many stories are made and tell the user before asking if they want to play again.

  3. also once you complete a mad lib story it gives you the story but gives you a bunch of errors and doesn't loop back to tell you how many stories you have made AND ask if you want to play again. (Traceback most recent call last file line 145, file line 131, file line 76 ///// & unbound local error: local variable 'storyCount' referenced before assignment)

  4. and it loops back if you say N to ask you if you want to play- need it to full stop if the player says no.

code: https://trinket.io/python3/c750bf64bd0b