Hello,
I’m a newbie coder I am currently in Village Guard because it says I have an error "end expected (to close if at 19:1) at 19:1
This is the code I have (LUA)
-- Patrol the village entrances.
-- If you find an enemy, attack it.
loop
local leftEnemy = self:findNearestEnemy()
if leftEnemy then
self:attack(leftEnemy)
self:attack(leftEnemy)
end
-- Now move to the right entrance.
-- Use "if" to attack if there is an enemy.\
loop
self:moveXY(60, 31)
local rightEnemy = self:findNearestEnemy()
if rightEnemy then
self.attack(rightEnemy)
end
end