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 trialRa Bha
2,201 PointsGetting an error " bash: -out:TreehouseDefense.exe: command not found " when running my code. What is my code missing?
My code is not printing True and False as it does in the video. However, I can't identify where I've gone wrong.
Here's the snapshot of my Workspace: (link)[https://w.trhou.se/azfxojhbfn]
2 Answers
Steven Parker
231,198 PointsIt sounds like your compile command might be missing the "mcs" keyword. To compile your code, you would typically type something like this:
mcs -out:TreehouseDefense.exe *.cs
Also, it looks like your Point.cs has a brace out of place. The one currently on line 7 should probably come after line 12.
Ra Bha
2,201 PointsThanks, Steven! I updated the code with your suggestions and it cleared all the errors. However, I received the following warning message from the Console upon after compiling:
Tower.cs(5,11): warning CS0414: The private field `TreehouseDefense.Tower.tower' is assigned but its value is never used
Compilation succeeded - 1 warning(s)
Workspace snapshot here: (link)[https://w.trhou.se/gg0warweqj]
Thoughts?
Steven Parker
231,198 PointsSteven Parker
231,198 PointsThat warning isn't going to keep the program from compiling or running. If you didn't miss any steps in building the program, it could just be something that has been defined in preparation for being used in a later step of the course.