Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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