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
Tab Error on Dungeon Game
Whenever I try to run my game I get this error and I am unable to fix it? Any help is appreciated, thanks.
File "dungeon_game.py", line 12
if monster == door or monster == start or door == start:
TabError: inconsistent use of tabs and spaces in indentation
Yea that happens when posting here. So, it is possible that you may have, at separate times, used tab to indent and space to indent. This, in my experience, causes this error. Unfortunately, it is a pain. Highlight all of your code in your workspace, and click 'ctrl+]' until all of your code is left aligned, then you're going to re-indent ONLY using either space or tab. Tab is more convenient.
Could you delete your code post, and re-post with proper markdown? This is not legible. Post this way:
<your code here>
Ooop...ha sorry. I wrote the instructions but the markdown formatted my post.
If you go to the bottom of the box where you are typing, you'll see a markdown cheatsheet link. Click it.
it's either ctrl+] or ctr+[ it's been a while since i have used workspaces.
sorry for all the quick responses, but i would start with line 12 first and see if that is the only indentation problem