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 trialTojo Alex
Courses Plus Student 13,331 PointsError with code
This is my error: https://w.trhou.se/o94exjyv3x
3 Answers
Steven Parker
231,268 PointsI assume you're asking about these compiler errors:
Point.cs(10,9): error CS0103: The name 'X' does not exist in the current context
Point.cs(11,9): error CS0103: The name 'Y' does not exist in the current context
If you look in "Point.cs" on lines 5 and 6 you'll see where "x" and "y" are defined (both lower-case). But those definitions should be for "X" and "Y" (in upper-case) instead..
Tojo Alex
Courses Plus Student 13,331 Pointsok thanks i will try to do that
Tojo Alex
Courses Plus Student 13,331 Pointsi just tried the code in the console I have these errors
treehouse:~/workspace$ mcs -out:TreehouseDefense.exe * cs && mono TreehouseDefense.exe
error CS2015: Source file TreehouseDefense.exe' is a binary file and not a text file
error CS2001: Source file
cs' could not be found
Compilation failed: 2 error(s), 0 warnings
Steven Parker
231,268 PointsIt looks like you have a space instead of a period between the *
and "cs" in your compiler command. It should be "*.cs
".
Steven Parker
231,268 PointsSteven Parker
231,268 PointsI figured this one out; but in future questions, please describe the issue you are having with the code!