#đź”’ Menu displaying double in a text based game

12 messages · Page 1 of 1 (latest)

edgy pecanBOT
#

@light mountain

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

light mountain
#

aw man the original message got deleted.........

I'm trying to make a lawfirm based text game, but I'm struggling to get the menu functionality right. This is what it looks like in the terminal:

Clients Menu:

  1. List current clients
  2. Search for a new client
  3. Go back
    Enter your choice: 3
    Menu:
  4. Clients
  5. Lawyers
  6. Save Game
  7. Load Game
  8. Quit
    Firm Balance: $743,084
    Average Lawyer CA: 65.40
    Average Client Reputation: 35.67
    Menu:
  9. Clients
  10. Lawyers
  11. Save Game
  12. Load Game
  13. Quit
    Firm Balance: $743,084
    Average Lawyer CA: 65.40
    Average Client Reputation: 35.67
    Enter your choice:

It displays the menu double, which it shouldnt.

The entire code is 300 lines long and I think discord removes the .py file. Here is the menu functions:

restive heron
#

!paste

edgy pecanBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

light mountain
#

I can provide the full code if needed

steel yarrow
#

Then you go to clients menu,
And then you choose option 3?

#
  • Option 3 breaks the “client menu” loop.
  • it displays the main menu.
  • there’s no more code in the client menu function, so you arrive back at the main menu.
  • there’s no more code in that loop of the main menu so you arrive at the top of the main menu, which;
  • displays main menu again
#

Hope that helps!
Feel free to ask for more info if needed.

steel yarrow
#

@light mountain

edgy pecanBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.