Hm... Tried changing that, but it didn't help....

On Thu, Oct 2, 2008 at 9:18 AM, Luke Paireepinart <[EMAIL PROTECTED]>wrote:

> room == start is a comparison (check if room is equal to start - doesn't
> make a whole lot of sense to be doing that here).  The "room" variable name
> doesn't exist in the current namespace, so it can't be compared to start.
> It looks like you wanted room = start.
>
> On 10/2/08, nathan virgil <[EMAIL PROTECTED]> wrote:
>
>> 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
>>
>> Error:
>>
>> 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?
>>
>> _______________________________________________
>> Tutor maillist  -  Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to