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.

Game Development How to Make a Video Game Score, Enemies, and Game State Add a Start and End

What does it mean by the namespace "global" already contains a definition for "gameState"?

I got this error message when I tried to play it.

What can I do to fix this?

Henrique Vignon
Henrique Vignon
Courses Plus Student 6,415 Points

it should be the code in the script called "GameState" that should be added in your Game manager object

here I created a codeshare, just copy and paste in there https://codeshare.io/5N3OKV and I'll be able to see it

Actually sorry about all this. I realize what I did. Somehow I used the same code twice. Not quite sure how that happened but i think i fixed the problem.