GetTargetActor and GetCasterActor return "None"

Post » Sun Nov 09, 2014 4:44 am

So, yeah, a very mind-boggling bug!

First, my script:

ScriptName ACGMagicEffectBrisingr extends ActiveMagicEffectActor Property RefCaster Auto ; Reference to the Actor that cast this effect.Actor Property RefTarget Auto ; Reference to the Actor this effect is active on.ACGQuestMagicSystemScript Property RefMagicSystemQuest Auto ; Reference to the quest script.Spell Property RefSpell Auto ; Reference to the spell we will cast.String Property EffectNameEnglish = "Fire" Auto ; The name of this effect in English.String Property EffectNameAL = "Brisingr" Auto ; The name of this effect in the AL.Float Property MEffectBaseTimeCost = 1.0 Auto ; Base energy cost per second.Float Property MEffectBaseDistanceCost = 0.5 Auto ; Base energy cost per foot.Float Property HealthDamageBase = 20.0 Auto ; Base damage magnitude per second.Bool Property DeathDispel = True Auto ; For non-Essential Actors.Bool Property BleedoutDispel = True Auto ; For Essential Actors.Event OnEffectStart(Actor akTarget, Actor akCaster)	RefCaster = Self.GetCasterActor()	RefTarget = Self.GetTargetActor()	Debug.Notification("RefCaster: " + RefCaster as String)	Debug.Notification("RefTarget: " + RefTarget as String)		RefMagicSystemQuest.RegisterEffect(RefTarget, RefCaster, EffectNameAL, MEffectBaseTimeCost, MEffectBaseDistanceCost, HealthDamageBase, DeathDispel, BleedoutDispel)EndEvent

There's nothing in this script that would cause GetCasterActor and GetTargetActor to return a "None" value, right? Is there something I'm not understanding here?

By the way, here's the relevant section of the Papyrus log:

[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterEffect() - "ACGQuestMagicSystemScript.psc" Line 73	[None].ACGMagicEffectBrisingr.OnEffectStart() - "ACGMagicEffectBrisingr.psc" Line 23[11/08/2014 - 08:19:37PM] Error: Cannot call RegisterEffect() on a None object, aborting function callstack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterEffect() - "ACGQuestMagicSystemScript.psc" Line 76	[None].ACGMagicEffectBrisingr.OnEffectStart() - "ACGMagicEffectBrisingr.psc" Line 23[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterEffect() - "ACGQuestMagicSystemScript.psc" Line 76	[None].ACGMagicEffectBrisingr.OnEffectStart() - "ACGMagicEffectBrisingr.psc" Line 23[11/08/2014 - 08:19:37PM] Error: Cannot call RegisterEffect() on a None object, aborting function callstack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterEffect() - "ACGQuestMagicSystemScript.psc" Line 77	[None].ACGMagicEffectBrisingr.OnEffectStart() - "ACGMagicEffectBrisingr.psc" Line 23[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterCasterScript() - "ACGQuestMagicSystemScript.psc" Line 22	[Active effect 2 on  (00000014)].ACGMagicCasterActorScript.OnEffectStart() - "ACGMagicCasterActorScript.psc" Line 26[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterCasterScript() - "ACGQuestMagicSystemScript.psc" Line 22	[Active effect 2 on  (00000014)].ACGMagicCasterActorScript.OnEffectStart() - "ACGMagicCasterActorScript.psc" Line 26[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterCasterScript() - "ACGQuestMagicSystemScript.psc" Line 23	[Active effect 2 on  (00000014)].ACGMagicCasterActorScript.OnEffectStart() - "ACGMagicCasterActorScript.psc" Line 26[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterTargetScript() - "ACGQuestMagicSystemScript.psc" Line 16	[Active effect 2 on  (0001A691)].ACGMagicTargetActorScript.OnEffectStart() - "ACGMagicTargetActorScript.psc" Line 30[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterTargetScript() - "ACGQuestMagicSystemScript.psc" Line 16	[Active effect 2 on  (0001A691)].ACGMagicTargetActorScript.OnEffectStart() - "ACGMagicTargetActorScript.psc" Line 30[11/08/2014 - 08:19:37PM] Error: Cannot access an element of a None arraystack:	[ACGQuestMagicSystem (14000D63)].acgquestmagicsystemscript.RegisterTargetScript() - "ACGQuestMagicSystemScript.psc" Line 17	[Active effect 2 on  (0001A691)].ACGMagicTargetActorScript.OnEffectStart() - "ACGMagicTargetActorScript.psc" Line 30
User avatar
James Hate
 
Posts: 3531
Joined: Sun Jun 24, 2007 5:55 am

Return to V - Skyrim