Jump to content

Um...adventure game in python3 gives early game completion

- - - - -

  • Please log in to reply
21 replies to this topic

#1
milleja46

milleja46

    Newbie

  • Members
  • PipPip
  • 29 posts
Ok for a class i have been making a simple text-based adventure game which basically works. Except for the fact when you try going to certain rooms it gives you a early success report. Which makes no sense so what i'm wondering is there something wrong with the logic or have i just wrote something wrong? :crying: (and yes i did get to running it before submitting it when the error was produced which it didn't exist until room one existed)(code will be more commented out in later times)
Code:
""" advent.py

    goes through a bunch of rooms before finally finding the key to get out

    9/1/2011 Joshua Miller """


################################################################################

#ok let's define a few key things to the adventure and ask for the username and#

#let's ask the user's name and introduce them to the game.                     #

################################################################################

import random

done = "Done!"


################################################################################

#Now let's ask them if they are ready, but we have to convert to upper for it  #

#to work right. This variable will be used a later for a decision purpose      #

################################################################################

class room():

    def zero():

        print(" ")

        print("Room zero...the starting point of all...you've returned here or have just started. The room has some torches lit in the corners")

        print(" ")

        direction = input("There are three exits to the room which way would you like to go? (L U D)")

        direction = direction.upper()

        if direction in "LUD":

            if direction == "L":

                room.two()

            elif direction == "U":

                room.four()

            elif direction == "D":

                if haveKey == True:

                    print("   ")

                    finished

                elif fakeKeyHave == "True":

                    print("  ")

                    print("You stick the key in the door and try turning it, but it won't budge. You try a little harder and it breaks...turns out that was a fake key...")

                    room.zero()

                else:

                    print("  ")

                    print("I'm sorry %s, but you appear not to be in possession of the key nesscary to leave...please keep looking!")

                    room.zero()

        else:

            print(" ")

            print("that direction is not possible")

            room.zero()


    def one():

        print(" ")

        print("This is a dead end, you look and around and see a old standing in the corner")

        print("  ")

        talk = input("Would you like to talk to him?")

        talk.upper()

        if talk == "YES":

            haveKey = True

            print("   ")

            print("You talk to the old man and he says, 'Congratulations on finding me. I will now give you the key to exit. You have done well in coming this far. You may now leave the dungeon'")

            print("   ")

            print("You now have the key, you lift it over your head in triumph")

            print("   ")

            print("The old man says: 'Ugh...why do they always do that?'")

        elif talk == "Y":

            print("   ")

            print("You talk to the old man and he says, 'Congratulations on finding me. I will now give you the key to exit. You have done well in coming this far. You may now leave the dungeon'")

            print("   ")

            print("You now have the key, you lift it over your head in triumph")

            print("   ")

            print("The old man says: 'Ugh...why do they always do that?'")

        else:

            print("The old man stares at you in silence")

            room.one()

        print(" ")

        question = input("Would you like to exit the room?")

        question.upper()

        if question == "YES":

            room.five()

        elif question == "Y":

            room.five()

        else:

            room.one()


    def two():

        print(" ")

        print("You come to a room with two exits and a dim light coming in from above")

        print(" ")

        direction = input("Which way would you like to go?(U or R)")

        direction = direction.upper()

        if direction == "U":

            room.three()

        elif direction == "R":

            room.zero()


    def three():

        print(" ")

        print("You enter a room with another two exits. You see a few relics and a few torches in the corners.")

        print(" ")

        direction = input("You may go right or down to exit. What's your choice?")

        direction.upper()

        if direction == "R":

            room.four()

        elif direction == "D":

            room.two()


    def four():

        print(" ")

        print("The room is lined with expensive family jewels and a deep cackle can be heard in the distance as well there are three exits")

        print(" ")

        direction = input("Which direction would you like to go? (U, L, D)")

        direction.upper()

        if direction == "U":

            room.seven()

        elif direction == "L":

            room.three()

        elif direction == "D":

            room.zero()


    def five():

        print("  ")

        print("A room you've found looks to be a old dungeon room. The cells are are locked and there seems to be be some treasure in the one to your right")

        direction = input("There are two exits one to your back and one infrontwhich way would you like to go?")

        direction = direction.upper()

        if direction == "U":

            room.eight()

        elif direction == "D":

            room.one()

        else:

            print("  ")

            print("You go that way and run into a wall")

            room.five()


    def six():

        print("  ")

        print("A furnished bedroom is before you where some of candles lit at the top of the bed. You see a mirror to your right and some moonlight fades in through the window to your left")

        print("You see a key on a nightstand and pick it up(Was it really that easy?)")

        fakeKeyHave = "True"

        direction = input("Would you like to exit the room?")

    def seven():

        print("  ")

        print("You walk into a room with two exits one seems to lead to a kitchen, and this seems to be a dining room with a long table that looks recently set and a chandiler hanging from the ceiling with candles burning")

        print("  ")

        direction = input("Which way would you like to go?(D or R)")

        direction = direction.upper()

        if direction == "DOWN":

            room.four()

        elif direction == "D":

            room.four()

        elif direction == "RIGHT":

            room.eight()

        elif direction == "R":

            room.eight()

        else:

            print("  ")

            print("I'm sorry that direction is impossible")

            room.seven()

    def eight():

        print("  ")

        print("You enter a kitchen with two exits, and a very expensive looking one at that!")

        print("  ")

        direction = input("Which way would you like to go? (LD)")

        direction.upper()

        if direction == "L":

            room.seven

        elif direction == "LEFT":

            room.seven()

        elif direction == "D":

            room.five()

        elif direction == "DOWN":

            room.five()

class start():

    door = "Locked"

    global haveKey

    haveKey = False

    global fakeKeyHave

    fakeKeyHave = "False"

    name = input("Hello Adventurer what is your name? ")

    print(" ")

    intro = print("Somewhere in the distance you hear a voice saying, 'Welcome %s If you wish to exit the dungeon you must find me to get the key. In total there are 9 rooms you are in the first of these. The insructions are simple when you are given a choice are L for left U for up and so forth using the first letter of the direction.'" % name)

    ready = input("Are you ready to go %s? " % name)

    ready = ready.upper()

    if ready == "YES":

        print(" ")

        print("You will now start the door is now locked you can't exit the dungeon until you have completed each room")

        room.zero()

    else:

        print(intro)

        ready = input("Are you ready to go %s? " % name)

        ready = ready.upper()

        if ready == "YES":

            start()

        elif ready == "Y":

            start()

        else:

            print(done)

class finished():

    print("Amazing! You completed this game(though very simplistic), still we have to commend you for your efforts!")

    print("  ")

    print("Would you like to go again?")

    print("  ")

    goAgain = input("Would you?")

    goAgain.upper()

    if goAgain == "YES":

        start()

            

start()

print(" ")

print(done)

Map is a 3 by 3

Attached File  advent.png   16.78K   36 downloads

Any help would be appreciated ^^

Edited by milleja46, 02 September 2011 - 01:31 PM.


#2
milleja46

milleja46

    Newbie

  • Members
  • PipPip
  • 29 posts
Or could someone point me to a good tutorial to make the proper engine, and other required details for it to run properly? I've tried making my own engine, but i get stuck on making the room part, as in how to properly build a room, it's commands and other basic details because of the fact i've never truly tried building a game, usually I just do little short in sweet programs that are like a function because they have a small but simple purpose unlike this but because the class wanted us to make a simple text-adventure game, i thought i would acutally try making it in to a true game but so far have failed miserably. I know what it has to do to run, just how to do that is beyond me without some help. So any help or tutorial someone could provide would be great

Edit: here's actually what i've come up with so far, yet have no idea where to go from here really:
#engine.py

#handles most of the game events


class __init__(self, name):

    def name():

        name = input("What is your name")

    def introduction(welcome, instructions):

        welcome = "Hello and welcome to the castle adventure game. You are about to enter a dungeon where i'll be your eyes and ears. You can only tell me what to do that i might accutually know how to do. You will recieve the true instructions in a bit. First I need to know your name. Then you may enter and start your adventure."

        instructions = "There are commands that you must enter to progress around the world of CA game. Here are a few brief ones you should enter to get started: NAME, ENTER. You must enter your name and then enter the castle. Once inside there is no going back until you finish. "

    def rooms(number, description, examine):

        number = ""

        description = ""

        examine = ""

Is there any simple way of achieving this task without trying to frustrating myself to the point of wondering where i went wrong and failing like i have so far in trying to solve it? I just haven't been able to find a good guide so far

#3
milleja46

milleja46

    Newbie

  • Members
  • PipPip
  • 29 posts
O.O i figured it out so nevermind....the start and finished needed to be fn's not classes XD

#4
Flying Dutchman

Flying Dutchman

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 890 posts
  • Location:::1
Code you provided for engine.py is not syntaxly correct. It should be:
class ClassName(ClassParent):
    def __init__(self, AdditionalParameters): # constructor
        # code

    def someMethod(self, Params): # note the self word
        # code

A conclusion is where you got tired of thinking.
#define class struct    // All is public.

#5
milleja46

milleja46

    Newbie

  • Members
  • PipPip
  • 29 posts
Well actually i'm not using engine.py i went back to my original code and figured out the problem with that...well figured out how to fix one problem, i just have to figure out why the "keys" either fake or real don't produce the desired result once the user obtains and retreats back to room zero. The code since making changes is now:
""" advent.py

    goes through a bunch of rooms before finally finding the key to get out

    9/1/2011 Joshua Miller """


################################################################################

#ok let's define a few key things to the adventure and ask for the username and#

#let's ask the user's name and introduce them to the game.                     #

################################################################################

import random

done = "Done!"

haveKey = False

fakeKeyHave = False


################################################################################

#Now let's ask them if they are ready, but we have to convert to upper for it  #

#to work right. This variable will be used a later for a decision purpose      #

################################################################################

class game():

    def start():

        door = "Locked"

        haveKey = False

        fakeKeyHave = False

        global name

        name = input("Hello Adventurer what is your name? ")

        print(" ")

        intro = print("Somewhere in the distance you hear a voice saying, \

'Welcome %s If you wish to exit the dungeon you must find me to get the key. In total there are 9 rooms you are in the first of these. The insructions are simple when you are given a choice are L for left U for up and so forth using the first letter of the direction.'" % name)

        ready = input("Are you ready to go %s? " % name)

        ready = ready.upper()

        if ready == "YES":

            print(" ")

            print("You will now start the door is now locked you can't exit the\

dungeon until you have completed each room")

            room.zero()

        elif ready == "Y":

            print(" ")

            print("You will now start the door is now locked you can't exit the\

dungeon until you have completed each room")

            room.zero()

        else:

            game.start()

    def finished():

        print("\nAmazing! You completed this game(though very simplistic), \

still we have to commend you for your efforts!")

        print("\nWould you like to go again?")

        goAgain = input("\nWould you?")

        goAgain.upper()

        if goAgain == "YES" or goAgain == "Y":

            room.start

        else:

            print(done)

class room():

    def zero():

        print("\n Room zero...the starting point of all...you've returned here \

or have just started. The room has some torches lit in the corners")

        print(" ")

        direction = input("There are three exits to the room which way would \

you like to go? (L U D)")

        direction = direction.upper()

        if direction in ['L', 'U', 'D']:

            if direction == "L" or direction == "LEFT":

                room.two()

            elif direction == "U" or direction == "UP":

                room.four()

            elif direction == "D" or direction == "DOWN":

                if haveKey == True:

                    game.finished()

                elif fakeKeyHave == True:

                    print("\nYou stick the key in the door and try turning it, but it won't budge. You try a little harder and it breaks...turns out that was a fake key...")

                    room.zero()

                else:

                    print("\nI'm sorry %s, but you appear not to be in possession of the key nesscary to leave...please keep looking!" % name)

                    room.zero()

        else:

            print("\n You run into a wall going that way.")

            room.zero()


    def one():

        print(" ")

        print("This is a dead end, you look and around and see a old standing in the corner")

        print("  ")

        talk = input("Would you like to talk to him?")

        talk.upper()

        if talk == "YES" or talk == "Y":

            haveKey = True

            print("\nYou talk to the old man and he says, 'Congratulations on\

finding me. I will now give you the key to exit. You have done well in coming this far. You may now leave the dungeon'")

            print("\nYou now have the key, you lift it over your head in \

triumph")

            print("\nThe old man says: 'Ugh...why do they always do that?'")

            print("Hmm, looks like now there is nothing left to do here, so you\

go back to the previous room")

            room.five()

        else:

            print("\nThe old man stares at you in silence")

            room.one()


    def two():

        print("\nYou come to a room with two exits and a dim light coming in \

from above")

        direction = input("\nWhich way would you like to go?(U or R)")

        direction = direction.upper()

        if direction == "U" or direction == "UP":

            room.three()

        elif direction == "R" or direction == "RIGHT":

            room.zero()

        else:

            print("\nI'm so sorry, but it appears you have run into a wall \

trying to walk that way....try again!")

            room.two()


    def three():

        print("\nYou enter a room with another three exits. You see a few \

relics and a few torches in the corners.")

        direction = input("\nYou may go right or down to exit. What's your choice?")

        direction.upper()

        if direction == "R" or direction == "RIGHT":

            room.four()

        elif direction == "D" or direction == "DOWN":

            room.two()

        elif direction == "U" or direction == "UP":

            room.six()

        else:

            print("\nYou have run into a wall")

            room.three()


    def four():

        print("\nThe room is lined with expensive family jewels and a deep cackle can be heard in the distance as well there are three exits")

        direction = input("\nWhich direction would you like to go? (U, L, D)")

        direction.upper()

        if direction == "U" or direction == "UP":

            room.seven()

        elif direction == "L" or direction == "LEFT":

            room.three()

        elif direction == "D" or direction == "DOWN":

            room.zero()

        else:

            print("\nThat isn't a direction! So you ran into a wall!")

            room.four()


    def five():

        print("\nA room you've found looks to be a old dungeon room. The cells are are locked and there seems to be be some treasure in the one to your right")

        direction = input("\nThere are two exits one to your back and one infrontwhich way would you like to go?")

        direction = direction.upper()

        if direction == "U" or direction == "UP":

            room.eight()

        elif direction == "D" or direction == "DOWN":

            room.one()

        else:

            print("\nYou go that way and run into a wall")

            room.five()


    def six():

        print("\nA furnished bedroom is before you where some of candles lit at the top of the bed. You see a mirror to your right and some moonlight fades in through the window to your left")

        print("\nYou see a key on a nightstand and pick it up(Was it really that easy?)")

        game.start.fakeKeyHave = True

        print("\nSeems you have nothing left to do in this room, so you exit to the previous room")

        room.three()

    def seven():

        print("\nYou walk into a room with three exits one seems to lead to a kitchen, and this seems to be a dining room with a long table that looks recently set and a chandiler hanging from the ceiling with candles burning")

        direction = input("\nWhich way would you like to go?(L, D or R)")

        direction = direction.upper()

        if direction == "DOWN" or direction == "D":

            room.four()

        elif direction == "R" or direction == "RIGHT":

            room.eight()

        else:

            print("\nSeems you've run into a wall")

            room.seven()

    def eight():

        print("\nYou enter a kitchen with two exits, and a very expensive looking one at that!")

        direction = input("\nWhich way would you like to go? (LD)")

        direction.upper()

        if direction == "L" or direction == "LEFT":

            room.seven

        elif direction == "D" or direction == "DOWN":

            room.five()

        else:

            print("\nIt seems you have run into a wall...let's try that again")

            room.eight()

            

game.start()

print("\n", done)


now to just figure out how to fix the keys XD

Later games I make will be done right as this is just a first game I am making in the class...later ones will include some pygame and things like that. But the simple goal of the assignment was to make a simple text adventure game. So I did it the only true way I know how....

#6
Flying Dutchman

Flying Dutchman

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 890 posts
  • Location:::1
In your start method of class game you're calling method itself without object.
class Game:
    def start(self):
        # some code

gameObj = Game()
gameObj.start()
In code above, Game is a class with a start method. gameObj is an object that actually calls the method. It is also possible to call a method without object, those are called anonymous functions/methods. You're doing the same mistake in class room.

I'm not trying to discourage you, but I strongly recommend that you read up on classes.
A conclusion is where you got tired of thinking.
#define class struct    // All is public.

#7
milleja46

milleja46

    Newbie

  • Members
  • PipPip
  • 29 posts
Well i made that change but it seems that after i did it the intro print statement is invalid XD it worked better before i made that change...i just had to figure out where the keys should be so that their definition from False to True could be changed by the user obtaining a certain one by going to a room...which it seemed before i made that change that the code gave user confirmation text i told it to give them but it passes over the if when they try exiting the castle through room 0

Edit: Disreguard the part about it not liking print....i apparently forgot to check to make sure i was in the python 3.2 IDLE and not python 2.6 IDLE

Edited by milleja46, 04 September 2011 - 11:42 AM.


#8
Flying Dutchman

Flying Dutchman

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 890 posts
  • Location:::1
Yeah, in Python 3.x print is longer a keyword but a function; I'm still getting used to and don't really know why they did that.
A conclusion is where you got tired of thinking.
#define class struct    // All is public.

#9
milleja46

milleja46

    Newbie

  • Members
  • PipPip
  • 29 posts
Well the way i see it is, it takes that string and returns it as text the user can see....that sounds like a function to me...

But i got it to run again but it won't go to room zero:
""" advent.py

    goes through a bunch of rooms before finally finding the key to get out

    9/1/2011 Joshua Miller """


################################################################################

#ok let's define a few key things to the adventure and ask for the username and#

#let's ask the user's name and introduce them to the game.                     #

################################################################################

import random

done = "Done!"

haveKey = False

fakeKeyHave = False


################################################################################

#Now let's ask them if they are ready, but we have to convert to upper for it  #

#to work right. This variable will be used a later for a decision purpose      #

################################################################################

class game():

    def __init__(self):

        door = "Locked"

        haveKey = False

        fakeKeyHave = False

        global name

        name = input("Hello Adventurer what is your name? ")

        print(" ")

        intro = print("Somewhere in the distance you hear a voice saying, \

'Welcome %s If you wish to exit the dungeon you must find me to get the key. In total there are 9 rooms you are in the first of these. The insructions are simple when you are given a choice are L for left U for up and so forth using the first letter of the direction.'" % name)

        ready = input("Are you ready to go %s? " % name)

        ready = ready.upper()

        if ready == "YES":

            print(" ")

            print("You will now start the door is now locked you can't exit the\

dungeon until you have completed each room")

            roomObj.zero()

        elif ready == "Y":

            print(" ")

            print("You will now start the door is now locked you can't exit the\

dungeon until you have completed each room")

            roomObj.zero

        else:

            game.start()

    def finished():

        print("\nAmazing! You completed this game(though very simplistic), \

still we have to commend you for your efforts!")

        print("\nWould you like to go again?")

        goAgain = input("\nWould you?")

        goAgain.upper()

        if goAgain == "YES" or goAgain == "Y":

            gameObj.start()

        else:

            print(done)

class room:

    def zero():

        print("\n Room zero...the starting point of all...you've returned here \

or have just started. The room has some torches lit in the corners")

        print(" ")

        direction = input("There are three exits to the room which way would \

you like to go? (L U D)")

        direction = direction.upper()

        if direction in ['L', 'U', 'D']:

            if direction == "L" or direction == "LEFT":

                roomObj.two()

            elif direction == "U" or direction == "UP":

                roomObj.four()

            elif direction == "D" or direction == "DOWN":

                if haveKey == True:

                    game.finished()

                elif fakeKeyHave == True:

                    print("\nYou stick the key in the door and try turning it, but it won't budge. You try a little harder and it breaks...turns out that was a fake key...")

                    roomObj.zero()

                else:

                    print("\nI'm sorry %s, but you appear not to be in possession of the key nesscary to leave...please keep looking!" % name)

                    roomObj.zero()

        else:

            print("\n You run into a wall going that way.")

            roomObj.zero()


    def one():

        print(" ")

        print("This is a dead end, you look and around and see a old standing in the corner")

        print("  ")

        talk = input("Would you like to talk to him?")

        talk.upper()

        if talk == "YES" or talk == "Y":

            haveKey = True

            print("\nYou talk to the old man and he says, 'Congratulations on\

finding me. I will now give you the key to exit. You have done well in coming this far. You may now leave the dungeon'")

            print("\nYou now have the key, you lift it over your head in \

triumph")

            print("\nThe old man says: 'Ugh...why do they always do that?'")

            print("Hmm, looks like now there is nothing left to do here, so you\

go back to the previous room")

            roomObj.five()

        else:

            print("\nThe old man stares at you in silence")

            roomObj.one()


    def two():

        print("\nYou come to a room with two exits and a dim light coming in \

from above")

        direction = input("\nWhich way would you like to go?(U or R)")

        direction = direction.upper()

        if direction == "U" or direction == "UP":

            roomObj.three()

        elif direction == "R" or direction == "RIGHT":

            roomObj.zero()

        else:

            print("\nI'm so sorry, but it appears you have run into a wall \

trying to walk that way....try again!")

            roomObj.two()


    def three():

        print("\nYou enter a room with another three exits. You see a few \

relics and a few torches in the corners.")

        direction = input("\nYou may go right or down to exit. What's your choice?")

        direction.upper()

        if direction == "R" or direction == "RIGHT":

            roomObj.four()

        elif direction == "D" or direction == "DOWN":

            roomObj.two()

        elif direction == "U" or direction == "UP":

            roomObj.six()

        else:

            print("\nYou have run into a wall")

            roomObj.three()


    def four():

        print("\nThe room is lined with expensive family jewels and a deep cackle can be heard in the distance as well there are three exits")

        direction = input("\nWhich direction would you like to go? (U, L, D)")

        direction.upper()

        if direction == "U" or direction == "UP":

            roomObj.seven()

        elif direction == "L" or direction == "LEFT":

            roomObj.three()

        elif direction == "D" or direction == "DOWN":

            roomObj.zero()

        else:

            print("\nThat isn't a direction! So you ran into a wall!")

            roomObj.four()


    def five():

        print("\nA room you've found looks to be a old dungeon room. The cells are are locked and there seems to be be some treasure in the one to your right")

        direction = input("\nThere are two exits one to your back and one infrontwhich way would you like to go?")

        direction = direction.upper()

        if direction == "U" or direction == "UP":

            roomObj.eight()

        elif direction == "D" or direction == "DOWN":

            roomObj.one()

        else:

            print("\nYou go that way and run into a wall")

            roomObj.five()


    def six():

        print("\nA furnished bedroom is before you where some of candles lit at the top of the bed. You see a mirror to your right and some moonlight fades in through the window to your left")

        print("\nYou see a key on a nightstand and pick it up(Was it really that easy?)")

        game.start.fakeKeyHave = True

        print("\nSeems you have nothing left to do in this room, so you exit to the previous room")

        roomObj.three()

    def seven():

        print("\nYou walk into a room with three exits one seems to lead to a kitchen, and this seems to be a dining room with a long table that looks recently set and a chandiler hanging from the ceiling with candles burning")

        direction = input("\nWhich way would you like to go?(L, D or R)")

        direction = direction.upper()

        if direction == "DOWN" or direction == "D":

            roomObj.four()

        elif direction == "R" or direction == "RIGHT":

            roomObj.eight()

        else:

            print("\nSeems you've run into a wall")

            roomObj.seven()

    def eight():

        print("\nYou enter a kitchen with two exits, and a very expensive looking one at that!")

        direction = input("\nWhich way would you like to go? (LD)")

        direction.upper()

        if direction == "L" or direction == "LEFT":

            roomObj.seven

        elif direction == "D" or direction == "DOWN":

            roomObj.five()

        else:

            print("\nIt seems you have run into a wall...let's try that again")

            roomObj.eight()


roomObj = room()

gameObj = game()

gameObj

print("\n", done)



#10
Flying Dutchman

Flying Dutchman

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 890 posts
  • Location:::1
Your room methods are missing a self keyword in parenthesis:
class room:
    def one(self): # and not: def one():
After I've added those self's, I tried your game and it worked. Finished it in first go (was drawing a map as I was going :P). I would make it possible that lower-case directions also work and maybe make text a bit prettier (fixed width or something like that, now it's wide as console window is).
A conclusion is where you got tired of thinking.
#define class struct    // All is public.

#11
milleja46

milleja46

    Newbie

  • Members
  • PipPip
  • 29 posts
So both keys worked?

---------- Post added at 05:41 PM ---------- Previous post was at 05:28 PM ----------

Also, the map should be something similar to:
[ATTACH=CONFIG]4222[/ATTACH]
Though i could've messed up(i redrew it earlier today and went through it to help make sure connections were right, althrough it does seem to be a little off) which it wouldn't be a first nor last

#12
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
The attachment is invalid; though you could try posting the attachment again.

***

Why don't you just check if `ready` is 'Y' and set `ready` to 'YES' if so?

if ready == 'Y' then ready= 'YES' end 

if ready == 'YES' then print "You're now entering the... " end 
(Sorry about the syntax, though, I kind of forgot how 'if' statements work in Python.)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users