Jump to content

Questions about making a text based game

12andCounting

sorry to aute you so much i just want you to see it instead of updating but why does this happen? http://prntscr.com/8mqppo

Update your code with what I pasted above, there's a couple of small changes from what you have.

Eeh, by gum.
 

ThrustJetViperPowerMustang: FX-6100 @4.4GHz (Stock Cooler) / 4x4GB Hyperam @ 1333MHz / OCZ Octane 250GB SSD / Asus HD6670 2GDDR3 / Asus M5A78LM-USB3

Link to comment
Share on other sites

Link to post
Share on other sites

Make sure you put brackets after 'input' when you define room_1 and doors().

I've updated my last reply with the correct code

okay so i see now ill have to add some elif functions too to make it better in some areas like the one to open the door and what not

 

thanks for the help so far

Link to comment
Share on other sites

Link to post
Share on other sites

why is it giving me a syntax error here 

def left_door():    print ('you say to yourself i guess im taking the left door')    hallway_1() def hallway_1():    print ('you slowly open the door on the left')    print ('the door leads to a long dark hallway')    print ('you hear footsteps again but this time even closer')    print ('you feel a force push you into a room'    st_room()   def st_room():    prompt_4 = input('you get up and notice a strage tear in the wallpaper. do you rip the paper or leave it alone: ')    if prompt_4 == 'leave it' or == 'leave it alone' : # i get it on this line it higlighet in red in this pic http://prntscr.com/8mrijj         print ('you decide to leave the paper alone and proceed to look around the room')        print ('you find some trinkets and knic-knacks but nothing usefull to you. other then a oddly shaped ring')        hallway_2()    elif prompt_4 == 'rip' it or == 'rip' or == 'rip the paper':        print ('as you tear the wallpaper you start to see a dim light at what seems to be a secret crawl space')        crawl_space()    else:        print ('unknowen characters')        st_room()       
Link to comment
Share on other sites

Link to post
Share on other sites

 

why is it giving me a syntax error here 

 

 

You don't need the '==' after the 'or'.

Eeh, by gum.
 

ThrustJetViperPowerMustang: FX-6100 @4.4GHz (Stock Cooler) / 4x4GB Hyperam @ 1333MHz / OCZ Octane 250GB SSD / Asus HD6670 2GDDR3 / Asus M5A78LM-USB3

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×