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 trialElfar Oliver
3,924 PointsI get an error I can't fix
Game.cs(45,40): error CS1061: Type TreehouseDefense.Level' does not contain a definition for
Play' and no extension method Play' of type
Tr
eehouseDefense.Level' could be found. Are you missing an assembly reference?
Level.cs(3,11): (Location of the symbol related to previous error)
1 Answer
Elfar Oliver
3,924 PointsI did literally nothing and it's fixed. Compiled and got "Player won" as instructed by the video.
Elfar Oliver
3,924 PointsElfar Oliver
3,924 PointsNow I've corrected lines 9 and 11 in Level.cs to correctly display "_invaders" and "invaders" instead of "invader" as it was before and now the error I'm receiving is: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at TreehouseDefense.Game.Main () [0x00074] in <06daf5b1b80b42cfacf4489f9165908e>:0