Essentially, I have a function which based on how long the player has been a vampire, adds certain spells to them. When the function player.addspell(spellname) is called, it fails due to a null reference. The output from the debug log is:
[03/26/2012 - 04:27:17PM] error: Cannot add a None spell to the actorstack:[ (00000014)].Actor.AddSpell() - "" Line ?[PlayerVampireQuest (000EAFD5)].playervampirequestscript.VampireFeed() - "PlayerVampireQuestScript.psc" Line 247[ (000CF02C)].PRKF_VampireFeedBeds_000CF02C.Fragment_0() - "PRKF_VampireFeedBeds_000CF02C.psc" Line 9
Now, this would seem to imply that I hadn't properly linked my spell reference in the Creation Kit. However, I've triple-checked, the references are all properly filled-in, and they are getting re-set to none at some unknown point between Skyrim's startup and my test cell loading.
My theories so far are that an ESM file from one of the patches is overriding my changes, or that something I don't understand is interfering. I've checked that the code for adding spells itself works with a test snipped attached to a button, so I know the failure is specifically in the spell reference, but I can't tell what to poke now to figure out what causes this.
Anyone know of anything similar, or additional steps I can take to debug this?
