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

C# C# Objects Methods Return Values

Tojo Alex
PLUS
Tojo Alex
Courses Plus Student 13,331 Points

Error with code

This is my error: https://w.trhou.se/o94exjyv3x

Steven Parker
Steven Parker
230,995 Points

I figured this one out; but in future questions, please describe the issue you are having with the code!

3 Answers

Steven Parker
Steven Parker
230,995 Points

I 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
PLUS
Tojo Alex
Courses Plus Student 13,331 Points

i 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 filecs' could not be found
Compilation failed: 2 error(s), 0 warnings

Steven Parker
Steven Parker
230,995 Points

It looks like you have a space instead of a period between the * and "cs" in your compiler command. It should be "*.cs".