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
177,670 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
177,670 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!