The two flowers help plz

The reason you are failing the level is because you are using hero.moveXY(item.pos.x, item.pos.y). That means that until you reach the item, all other code will not be executed. To solve this, replace hero.moveXY(item.pos.x, item.pos.y) with hero.move(item.pos). Also, in the for-loop with your soldiers, you should make sure that hero.findNearestEnemy() is returning an enemy before you command your soldiers to attack the enemy.