Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Steven Parker215,939 Points
The "arguments" are the values you pass in the parentheses when you make a call to a method.
So here's your definition of "decreaseHealth" on line 109 of Invader.cs:
public virtual void decreaseHealth(int factor, MapLocation towerLocation)
It now requires two arguments, an
int and a
But here on line 52 of Tower.cs it is being called but given only one argument:
Whenever you change a method signature (which means the number and/or type of arguments), you have to also change every place it is called in the code to match. So the call in Tower.cs needs to pass along the MapLocation now:
invader.decreaseHealth(towerPower, _location); // pass tower location also!
And the same issue applies in the two other places it gets called.