i made a lua script and when i start server i get this error
Failed. <couldnot load>
scripts/boss.lua:3: 'then' expected near 'unit'
script is
function phase_1(pUnit, Event)
if Unit:GetHealthPct() < 90 then
Unit:RemoveEvents();
Unit:SetScale(2)
Unit:RegisterEvent("phase_2",1000, 0)
end
end
function phase_2(pUnit, Event)
if Unit:GetHealthPct() < 50 then
Unit:RemoveEvents();
Unit:FullCastSpellOnTarget(25442)
Unit:SendChatMessage(12, 0, "ZAP!")
Unit:RegisterEvent("phase_3",1000, 0)
end
end
function phase_3(pUnit, Event)
if Unit:GetHealthPct(1)
Unit:RemoveEvents(); < 1 then
Unit:CastSpell(34807)
Unit:SendChatMessage(12, 0, "YOU GOT ME")
end
end
end
end
function boss_start(pUnit, Event)
Unit:RegisterEvent("phase_1",1000, 0)
end
RegisterUnitEvent(34500, 1, "boss_start")