Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Dungeon Game Movement

NameError

i'm having problems with the NameError for monster, door, player = location

https://teamtreehouse.com/workspaces/37891732# Kenneth has it on his code, and it works but mine's doesn't work

Steven Parker
Steven Parker
231,275 Points

You can't share a direct URL to your workspace, it's temporary and only exists while you are using it.

But you can use the snapshot function in the workspace and provide the link to that.

2 Answers

Steven Parker
Steven Parker
231,275 Points

On line 52 you have:

monster, door, player = location()

But no function named "location" has been defined. Did you mean "get_location" instead?

Also, on line 39:

    move = ["LEFT", "RIGHT", "UP", "DOWN"]

Instead of "move" (singular), did you mean "moves" (plural)?

ah thanks!