[Solved] Concept Challenge Forest Storm

I’m having trouble with the Concept Challenge Forest Storm on Computer Science 3. I have the code that is supposed to be the correct code to beat the level from the teacher account. I have it copied word for word after not being able to figure it out, and my character stands doing nothing. Any help would be appreciated.

I’m not a subscriber but I still might be able to help, what is your code and the objective.
@Chaboi_3000 might be able to help

Here is my code.

20

Your function isCloseType() returns false no matter what are the targets and distances.

First,
I know what it says in blue, but what is the objective(What does the first hint say), that woud help a little more.

Second,
What is

if(target.type == type) {

           }

Third,
The variable need to be on the outside of the while true loop

Fourth,
Other than that, I think it should work

// Attack enemies or collect items less than 15 meters away.
// Collect only “coin” type items.
// Attack only “munchkin” type enemies.

There are the hints.

Thank you(see edit).

That was the code that devs suggested to my teacher as the correct code when he was helping me try to figure this out. My original code for that was "if(item.type == “coin”){ ", i had two separate functions for coins and munchkins.