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

Diego Salas Polar
Diego Salas Polar
21,431 Points

I need help with this game I made from object-oriented python with sub-class and classes.

Here is the link to this code: https://w.trhou.se/h5oc7nqkb3. It seems the game isn't running and would like to know what I did wronged. Thank you.

3 Answers

I think the problem is you mixed up monsters and monster in your code. Usually we will add a "s" after the name if it is an array or list of something.

I looked through some of your program and your indentations are inconsistent (you start using 4 spaces instead of 2... either would be fine as long as it's consistent). This happened under character.py(on line 40+) and game.py(line 78+). Make sure that all indentations are the same and the program should run... you have other errors as well, but once your game runs, you will actually get the error messages which should help you determine the bugs. Hope this helps.

Diego Salas Polar
Diego Salas Polar
21,431 Points

Sorry for not answering back Wan and Elad, I finally got the game to run. You are right about having error Elad. Here is my link to my code and let work together to debug the game.

https://w.trhou.se/phcpp43ugl

Diego Salas Polar
Diego Salas Polar
21,431 Points

Sorry for not answering back Wan and Elad, I finally got the game to run. You are right about having error Elad. Here is my link to my code and let work together to debug the game.

https://w.trhou.se/phcpp43ugl