Dyramisty Posted February 7, 2013 Share Posted February 7, 2013 Hey guys, For the fifth installment in my "Mind" series I'm writing a new script and I'm having some issues.I hope perhaps one you guys could help me out.Credits will obviously be given. The code I have so far:Scriptname Base_Add_Conjuration_Selection extends ObjectReference {Adds one spell, removes six.} bool Function RemoveSpell(Spell akSpell, bool abVerbose = true) native bool Function AddSpell(Spell akSpell, bool abVerbose = true) native Spell Property SpellToRemove01 auto Spell Property SpellToRemove02 auto Spell Property SpellToRemove03 auto Spell Property SpellToRemove04 auto Spell Property SpellToRemove05 auto Spell Property SpellToRemove06 auto Spell Property SpellToAdd auto Event OnActivate (ObjectReference akActionRef) If akActionRef == Game.GetPlayer() akActionRef.RemoveSpell(SpellToRemove01, false) akActionRef.RemoveSpell(SpellToRemove02, false) akActionRef.RemoveSpell(SpellToRemove03, false) akActionRef.RemoveSpell(SpellToRemove04, false) akActionRef.RemoveSpell(SpellToRemove05, false) akActionRef.RemoveSpell(SpellToRemove06, false) Debug.Trace("Removed all") EndIF If akActionRef == Game.GetPlayer() akActionRef.AddSpell(SpellToAdd) Debug.Trace("Minds synchronised") EndIF EndEvent And this is what the compiler says:c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\Base_Add_Conjuration_Selection.psc(20' date='13): RemoveSpell is not a function or does not existc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\Base_Add_Conjuration_Selection.psc(21,13): RemoveSpell is not a function or does not existc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\Base_Add_Conjuration_Selection.psc(22,13): RemoveSpell is not a function or does not existc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\Base_Add_Conjuration_Selection.psc(23,13): RemoveSpell is not a function or does not existc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\Base_Add_Conjuration_Selection.psc(24,13): RemoveSpell is not a function or does not existc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\Base_Add_Conjuration_Selection.psc(25,13): RemoveSpell is not a function or does not existc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\Base_Add_Conjuration_Selection.psc(30,13): AddSpell is not a function or does not exist[/quote'] I hope someone is able to figure this out. Thanks in advance,Dyramisty Link to comment Share on other sites More sharing options...
Dyramisty Posted February 7, 2013 Author Share Posted February 7, 2013 Problem has been resolved. Link to comment Share on other sites More sharing options...
Loshirai14 Posted February 12, 2013 Share Posted February 12, 2013 LOL Link to comment Share on other sites More sharing options...
luthienanarion Posted February 12, 2013 Share Posted February 12, 2013 I'm guessing that you cast akActionRef as an actor. Link to comment Share on other sites More sharing options...
Recommended Posts