I am making a circlet which gives it's wearer the ability to equip a random spell contained in a formlist. to achieve this I have attached this script to the circlet.
Scriptname DA_SRPT_RandEnch extends ObjectReferenceFormlist Property SpellToEquip AutoEvent OnEquipped(Actor akActor)Debug.Notification("Event Fired.")int cbstate = akActor.GetCombatState()if cbstate == 1int n = SpellToEquip.GetSize() - 1n = Utility.RandomInt(0, n)akActor.EquipSpell(SpellToEquip.GetAt(n))EndIfEndEvent
I get an error at akActor.EquipSpell line "akspell and the argument passed to it are incompatible types."
Some one please help me understand how do I make it work?