Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Having trouble on Agrippa Refactored (JavaScript)


please help this is my code
function cleaveOrAttack(enemy) {
// If “cleave” is ready, cleave; otherwise, attack.
if (hero.isReady(“cleave”)) {
} else {
while (true) {
var enemy = hero.findNearestEnemy();
if (enemy) {
var distance = hero.distanceTo(enemy);
if (distance < 5) {
// Call the “cleaveOrAttack” function, defined above.

can someone please tell me what i’m doing wrong


Please format your code according to the FAQ. Also send a screenshot with more info about your problem