Hiya Im trying to write a script for a concentration cast spell that fills soul gems (based of wow warlock soul harvest ability), this is my script but it keeps crashing the skyrim creation kit when I save the script, what am I doing wrong any help will be much appreciated.
ScriptName SOULREAPER
EVENT OnEffectStart
if akcaster.GetItemCount(SoulGemPetty) >= 1
akcaster.AddItem(SoulGemPettyFilled, 1, false)
akcaster.RemoveItem(SoulGemPetty, 1, true)
Debug.Trace("You have reaped a soul")
ElseIf akcaster.GetItemCount(SoulGemLesser) >= 1
akcaster.AddItem.AddItem(SoulGemLesserFilled, 1, false)
akcaster.RemoveItem(SoulGemLesser, 1, true)
Debug.Trace("You have reaped a soul")
ElseIf akcaster.GetItemCount(SoulGemCommon) >= 1
akcaster.AddItem (SoulGemCommonFilled, 1, false)
akcaster.RemoveItem(SoulGemCommon, 1, true)
Debug.Trace("You have reaped a soul")
ElseIf akcaster.GetItemCount(SoulGemGreater) >= 1
akcaster.AddItem(SoulGemGreaterFilled, 1, false)
akcaster.RemoveItem(SoulGemGreater, 1, true)
Debug.Trace("You have reaped a soul")
ElseIf akcaster.GetItemCount(SoulGemGrand) >= 1
akcaster.AddItem(SoulGemGrandFilled, 1, false)
akcaster.RemoveItem(SoulGemGrand, 1, true)
Debug.Trace("You have reaped a soul")
else
Debug.Trace("You cannot reap any more souls")
Endif
endEVENT