Python Forum
Errors in simple text adventure game?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Errors in simple text adventure game?
#6
(Apr-10-2018, 05:44 PM)ecloev Wrote:
def youWin():
    print("Congratulations!")
    if deadBoss == False:

You're trying to use a variable that doesn't exist. If you're going to use a global variable, you have to let python know you're using a global variable.
Reply


Messages In This Thread
Errors in simple text adventure game? - by ecloev - Apr-06-2018, 05:12 PM
RE: Errors in simple text adventure game? - by nilamo - Apr-10-2018, 05:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  loop adventure game ilikedofs 1 1,729 May-26-2021, 12:43 AM
Last Post: bowlofred
  A text-based game [SOLVED] Gameri1 6 3,939 Apr-20-2021, 02:26 PM
Last Post: buran
  how to make a hotkey for text adventure game myn2018 2 1,999 Jan-06-2021, 10:39 PM
Last Post: myn2018
  Winning/Losing Message Error in Text based Game kdr87 2 3,014 Dec-14-2020, 12:25 AM
Last Post: bowlofred
  Choose your own adventure game noahc2004 2 2,593 Jun-26-2020, 02:06 PM
Last Post: DPaul
  Simple cards game blackpanda 3 4,274 Apr-10-2020, 08:46 PM
Last Post: TomToad
  Simple text to binary python script gmills13 2 2,841 Feb-04-2020, 08:44 PM
Last Post: snippsat
  How best to format text in a simple text file? Pedroski55 2 3,217 Jun-14-2019, 06:07 AM
Last Post: noisefloor
  Looking for simple help - text file stripping DerekK 1 2,141 Mar-08-2019, 10:06 AM
Last Post: Larz60+
  Waiting in a text adventure StickyLizard 1 44,409 Jan-19-2019, 10:45 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020