Need an Explanation

Post » Mon Jun 18, 2012 10:02 pm

I set up a script that debuffs player when the Sleep Buff (WellRested) wore off. Originally, I set up the quest and script to extend ReferenceAlias, and I get the following trace log error: (Alias_GetPlayer is the name of my reference alias)

error: HasMagicEffect called with invalid Magic Effect stack:
[ (00000014)].Actor.HasMagicEffect() - "" Line ?
[alias ALIAS_GETPLAYER on quest MyQuest01 (25000D62)].MyScript01.OnUpdate() - "MyScript01.psc"

That error refers to this line of code:
if (Game.GetPlayer().HasMagicEffect(RestedWellSkillEffect))

Now, If i change the quest and script to extend Quest, it works fine.
Could someone explain this to me please?

.
User avatar
Steve Bates
 
Posts: 3447
Joined: Sun Aug 26, 2007 2:51 pm

Return to V - Skyrim