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 trialAlwin Landler
1,070 PointsError CS1061
Hello, I am getting the following compilation error:
"treehouse:~/workspace$ mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe
Map.cs(19,20): error CS1061: Type TreehouseDefense.Point' does not contain a definition for
x' and no extension method x' of type
TreehouseDefens
e.Point' could be found. Are you missing an assembly reference?
Point.cs(3,9): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings "
Here are my screenshots: https://w.trhou.se/wp92ss1cs7 https://w.trhou.se/psoa3lnbyo
Can anyone help me find out what I am missing? Thanks in advance
2 Answers
Steven Parker
231,268 PointsAs Deyan mentioned, the names on line 19 of Map.cs are just in the wrong case. Here's that line corrected:
return point.X >= 0 && point.X < Width && point.Y >= 0 && point.Y < Height;
Alwin Landler
1,070 PointsThanks a lot guys, that was it. It's so easy to overlook something.. :)
Deyan Svetoslavov
5,959 PointsDeyan Svetoslavov
5,959 PointsThe fields in Point.cs are upper case and in Map.cs they are lower case - change in Map.cs point.X (to upper)