Originally Posted by
Juicyz
function Kil'Jaeden_OnLeaveCombat(unit)
RemoveEvents()
end
This is where your error is at. U need unit:RemoveEvents()
Also on your whole script at the end of every Function you just put (unit) You need to put (unit, Event) When you do this. It should work
I did all that, and still get an error.
Here is the new one.
Code:
function Kil'Jaeden_OnCombat(unit, Event)
unit:SendChatMessage(12, 0, "All my plans have lead to this.")
unit:PlaySoundToSet (12495)
end
function Kil'Jaeden_OnLeaveCombat(unit, Event)
unit:RemoveEvents()
end
function Kil'Jaeden_OnKilledTarget(unit, Event)
unit:SendChatMessage(12, 0, "Another step towards chaos!")
unit:PlaySoundToSet (12501)
end
function Kil'Jaeden_OnDied(unit, Event)
unit:SendChatMessage(12, 0, "Uggh.. the powers of the Sunwell turned against me... What have you done? What have you done?!")
unit:PlaySoundToSet (12510)
unit:RemoveEvents()
end
RegisterUnitEvent(25315, 1, "Kil'Jaeden_OnCombat")
RegisterUnitEvent(25315, 2, "Kil'Jaeden_OnLeaveCombat")
RegisterUnitEvent(25315, 3, "Kil'Jaeden_OnKilledTarget")
RegisterUnitEvent(25315, 4, "Kil'Jaeden_OnDied")
The error says:
21:36 N LuaEngine: Kil'Jaeden.lua...
failed. (could not load)
scripts\Kil'Jaeden.lua:1: unfinished string near ''Jaeden_OnCombat(unit,
Event)'