Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9024389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:59:45+00:00 2026-06-16T05:59:45+00:00

Trying to make my own RPG character generator for ex 45 in Zed Shaw’s

  • 0

Trying to make my own RPG character generator for ex 45 in Zed Shaw’s LPTHW. Part of the assignment is to make a new class for each ‘room’ of the program, like WelcomeScreen or ChooseMutations.

Here is the main program.

import rooms

class Program(object):

    def __init__(self, start):
        self.start = start

    def run(self):
        next_room_name = self.start

        while True:
            room = getattr(self, next_room_name)
            next_room_name = room()

x = rooms.WelcomeRoom()

Program(x.hello_user())

And here is the rooms file its trying to pull stuff from.

class WelcomeRoom(object):

    def __init__(self):
        pass

    def hello_user(self):
        print '*' * 79
        print '\n'
        print '\t\tWelcome to the'
        print '\t\tMetamorphosis Alpha Character & Random Encounter Generator'
        print '\t\tProgrammed poorly by Raymond Weiss'
        print '\n'
        print '*' * 79
        raw_input('Please press enter to continue')
        return 'get_name'

    def get_name(self):

        name = raw_input('Hello, whats your name?', 
                 '\n',
                 ':> ')

But when I run the main program in python, it just logs out instead of returning the function get_name() from rooms. Output posted below.

Raymond-Weisss-MacBook-Pro:macgre Raylug$ python macgre.py
*******************************************************************************


        Welcome to the
        Metamorphosis Alpha Character & Random Encounter Generator
        Programmed poorly by Raymond Weiss


*******************************************************************************
Please press enter to continue
Raymond-Weisss-MacBook-Pro:macgre Raylug$ 

I apologize in advance if my question title isn’t exactly what im trying to ask, as a newbie its sometimes hard not knowing what exactly to ask.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:59:46+00:00Added an answer on June 16, 2026 at 5:59 am

    You’re returning a string, not a function (or function result). You probably want something like:

    def hello_user(self):
        return self.get_name
    

    or

    def hello_user(self):
        return self.get_name()
    

    Based on your program, I think you probably want the second one. The difference is that the first one returns the get_name function, whereas the second one returns the results of the get_name function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to make my own IAuthorizationFilter attribute class. Basically, each api call has
I was trying to make my own class for currencies using longs, but apparently
I am new to iOS and trying to make my own simple app. I
I'm new on rails and I'm trying to make my own simple vote application.
I'm brand new to programming..im just trying to make my own program to find
I'm new to Maven and Im trying to make my own Java EE Maven
I'm learning about generics, so I'm trying to make my own generic array class,
I am trying to make my own CMS and I am pretty new in
I'm fairly new at c++ and I'm trying to make my own font drawing
Im trying to make my own FormsAuthentication in an ASP.NET MVC 4 application and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.