Can someone see the error? (Lua)

Can someone see what’s wrong whit this code?

while true do
local enemy = hero:findNearestEnemy
if enemy then
hero:attack(enemy)
hero:attack(enemy)
else
hero:say(“nothing here”)
end
end

When I try to use it says: end expected (to close if at 2:2) at 2:2

Please post your code according to the FAQ. It helps us better understand your code as we try to help you.
https://discourse.codecombat.com/faq