[Tutor] Hands-on beginner's project?

nathan virgil sdragon1984 at gmail.com
Thu Oct 2 15:10:36 CEST 2008

Okay, I'm resurrecting this project. I did a little more work on it then
what you see here, but that ended up getting accidentally deleted, and I
haven't done anything with Python since.

I'm running into one problem already, and I haven't really added any extra
code. In the content (at this point, the rooms still have Bob's
descriptions), the very first line of actual code (third line in the
program) is returning an error.

Offending code:

# Content
# retrieve data for current room
room == start
while true:
    if room == start:
        desc = "Ahead of you, you see a chasm."
        ques = "Do you wish to try jumping over it? Y/N"
        destY = 2
        destN = 3


Traceback (most recent call last):
  File "samplegame.py", line 3, in <module>
    room == start
NameError: name 'room' is not defined

What's going on here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20081002/ad9acdcf/attachment.htm>

More information about the Tutor mailing list