Jump to content

Missing something really obvious with RegisterForUpdateGameTime


Recommended Posts

Why isn't this function working? I've had this problem before, but I can't seem to recall why it's not working.

 

Here's the script:

Scriptname _gkx_influenceperktrackerscript extends activemagiceffect



Struct StatCheck



    String StatName

    Int StatNum

    Perk PerkAdd

    Message PerkMsg



EndStruct



StatCheck[] Property CheckList Auto



Int Count1

Int Count2



Event OnEffectStart(Actor Target, Actor Caster)



    RegisterForSingleUpdateGameTime(24.0)



EndEvent

 

Event OnUpdateGameTime()



    Count1 = 0

    While Count1 < CheckList.Length

        If Game.QueryStat(CheckList[Count1].StatName) >= CheckList[Count1].StatNum

            If !Game.GetPlayer().HasPerk(CheckList[Count1].PerkAdd)

                Game.GetPlayer().AddPerk(CheckList[Count1].PerkAdd)

                CheckList[Count1].PerkMsg.Show()

                Count2 += 1

            EndIf

        EndIf

        Count1 += 1

    EndWhile

    

    If Count2 < CheckList.Length

        RegisterForSingleUpdateGameTime()

    EndIf



EndEvent

And of course, I get this error:

_gkx_influenceperktrackerscript.psc(19,1): RegisterForSingleUpdateGameTime is not a function or does not exist

Please help!

 

Cheers!
~GKX

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...