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 trialMichael North
2,561 PointsMany errors
In my workspace there are a couple of error I can't quite figure out how to fix them. I was wondering if someone could look at my workspace and tell me what I did wrong. ://w.trhou.se/ivh4llej3j
3 Answers
Steven Parker
231,236 PointsIt looks like all typo's.
All errors appear to be in Game.cs:
- on line 30 there's a missing closing parentheses before the comma
- on line 39 there's a missing semicolon at the end of the line
- on line 48 "playerWon" (lower case "p") is misspelled as "PlayerWon" (capital "P")
These were easily found using the compiler error messages, which show you the module and line number to look on. Practice using these messages to locate your errors, and remember to check previous lines for omissions that might not be detected by the compiler until the next statement.
Michael North
2,561 PointsThank you, but now when I run the program it tells me, Program.cs is a binary file and not a text file.
Steven Parker
231,236 PointsWhat command did you enter when you got that message? Also please provide a fresh snapshot.
Michael North
2,561 PointsI typed in mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe
Michael North
2,561 PointsI typed in mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe
Steven Parker
231,236 PointsI see that you created a new question for this issue so I answered it there.