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 trialHannah Dickey
5,986 PointsDungeon Game Code
I hane been creating the dungeon game along with hte videsos and when it cam etime to test it I got this error
Welcome to the dungeon!
you are currently in room (0, 2)
Traceback (most recent call last):
File "dungeon_game.py", line 57, in <module>
print("You can move {}".format(", ".join(get_moves(player))))
TypeError: can only join an iterable
Please help I can't seem to figure this one out here is my code https://w.trhou.se/0x1s8rrt9v Thanks :)
2 Answers
Steven Parker
231,275 PointsCurrently, get_moves does not return any value unless y==4
.
You probably indented the return statement one stop too far. If you indent it less, then it will no longer be part of the if statement and the moves will always be returned.
Hannah Dickey
5,986 PointsThank you sooooo much!!! :)