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 trialRobert Bolista
Courses Plus Student 2,832 PointsGame.cs(12,32): error CS1061:
when I try to compile:
mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe
it shows this error:
Game.cs(12,32): error CS1061: Type TreehouseDefense.Map' does not contain a definition for
OnMap' and no exte
nsion method OnMap' of type
TreehouseDefense.Map' could be found. Are you missing an assembly reference?
Map.cs(3,11): (Location of the symbol related to previous error)
Game.cs(16,27): error CS1061: Type TreehouseDefense.Map' does not contain a definition for
OnMap' and no exte
nsion method OnMap' of type
TreehouseDefense.Map' could be found. Are you missing an assembly reference?
Map.cs(3,11): (Location of the symbol related to previous error)
Compilation failed: 2 error(s), 0 warnings
I paused the video checked what did I missed. I am sure it was all the same just like how he codes it. Please help, I am stuck with this topic.
Robert Bolista
Courses Plus Student 2,832 Points1 Answer
Jason Holt
10,041 PointsThe name of your method as it is written in Map.cs is onMap(). The call to the method is written as OnMap(). Have you checked the case on each letter?
Robert Bolista
Courses Plus Student 2,832 PointsOh, thank you so much. Probably I was tired, did not see it. :)
Jason Holt
10,041 PointsNo problemo. Very common mistake when youβre tired or not!
Steven Parker
231,261 PointsSteven Parker
231,261 PointsTo facilitate analysis, you can make a snapshot of your workspace and post the link to it here.