cannot figure out why my code is incorrect
# Use the checkAndAttack function to make your code easy to read.
# This function has a parameter.
# An parameter is a way of passing information into a function.
# The 'target' parameter is just a variable!
# It contains the argument when the function was called.
enemy = hero.findNearestEnemy()
topEnemy = hero.findNearestEnemy()
# Move to the bottom X mark.
# Create a variable named bottomEnemy and find the nearest enemy.
bottomEnemy = hero.findNearestEnemy()
# Use the checkAndAttack function, and include the bottomEnemy variable.
Welcome to the forum!! What level is this?
Thanks Eric! This is Backwoods Fork under Backwoods Forest https://codecombat.com/play/level/backwoods-fork
delete this, It SHOuld work
Your code works fine for me. Are you getting an error message, or is the hero not succeeding? Can you take a screenshot of you equipment and post it here?
I think jka might be right I think it is a equipment issue you might need more health but I dont think so.
hi there! this is the error i’m getting
yeah its totally a equipment issue.
you don’t have a sword powerfull anoghf to one shoot the munchkins and because of that your hero attacks the munchkin once then proceeds to move to the next X so maybe make your hero attach two times before moving to the next X
thank you! i adjusted my equipment and it works now omg thank you SO much
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.