Hi all who are here :wave:
I want to thank you for spending your precious time helping little old me 
Anyway basicly my LUA script is not working and i seriosly don't know why =P
Error in console:scripts\zombie king.lua:60: 'end' expected <to close 'function' at line 26> near '<eof>'
The script it's self:
Code:
function zombie_CheckA(Unit)
if Unit:GetHealthPct() < 92 then
Unit:FullCastSpellOnTarget(37852, Unit:GetMainTank())
end
end
function zombie_CheckB(Unit)
if Unit:GetHealthPct() < 65 then
Unit:FullCastSpell(40647)
Unit:CastSpell(36455)
end
end
function zombie_CheckC(Unit)
if Unit:GetHealthPct() < 55 then
Unit:FullCastSpellOnTarget(45664, Unit:GetMainTank())
Unit:FullCastSpell(40100)
end
function zombie_CheckD(Unit)
if Unit:GetHealthPct() < 45 then
Unit:FullCastSpell(42696)
Unit:CastSpell(29491)
end
function zombie_CheckE(Unit)
if Unit:GetHealthPct() < 10 then
Unit:CastSpell(40846)
Unit:SendChatMessage(15, 0, "Your good. But your not killing me i'm afraid.")
Unit:SendBroadcastMessage("The best person in the game is now Wiping the people trying to kill him.")
Unit:RegisterEvent("zombie_CheckF",1000, 0)
end
function zombie_CheckF(Unit)
Unit:FullCastSpellOnTarget(31984, Unit:GetClosestPlayer())
end
function zombie_OnCombat(Unit, Event)
Unit:RegisterEvent("zombie_CheckA",0, 0)
Unit:RegisterEvent("zombie_CheckB",0, 0)
Unit:RegisterEvent("zombie_CheckC",0, 0)
Unit:RegisterEvent("zombie_CheckD",0, 0)
Unit:RegisterEvent("zombie_CheckE",0, 0)
end
function zombie_OnLeaveCombat(Unit)
Unit:RemoveEvents()
end
function zombie_KilledTarget(Unit)
end
function zombie_OnDied(Unit)
Unit:RemoveEvents()
end
RegisterUnitEvent(1111111, 1, "zombie_OnCombat")
RegisterUnitEvent(1111111, 2, "zombie_OnLeaveCombat")
RegisterUnitEvent(1111111, 3, "zombie_OnKilledTarget")
RegisterUnitEvent(1111111, 4, "zombie_OnDied")
+ Rep to whoever can help me with this!