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

LUA argument error is not defined on line 2


item = self:findNearestItem(“Chest”)
enemy = self:findNearestEnemy()
– Check the distance to the nearest enemy.
if distance = self:distanceTo(enemy) <10
– If it comes closer than 10 meters, cleave it!
then self:cleave(enemy)
else self:attack(“Chest”)

could someone tell me why its happening and how to fix it? im not understanding why its not working


The chest is not an item. You don’t need to find it. Just use self:attack("Chest")and you should be fine.


oh heh why didnt i think of that