having trouble with the level “Stillness in motion” here’s my code, i get an error “end expected”
loop
local enemy = self:findNearestEnemy()
local distance = self:distanceTo(enemy)
if distance < 5 then
self:attack(enemy)
else
self:shield()
else
self:moveXY(41, 34)
end
end
end