Jump to content

Actor object error "GetNumItems is not a function or does not exist"


injaku

Recommended Posts

Trying to create an activemagiceffect that will work with the total amount of gold value held by the target, but it doesn't appear to see, or will not caste, the Actor into a ObjectReference.

https://ck.uesp.net/wiki/ObjectReference_Script "(Container only) Returns the number of forms in the container. (Actor ObjectReferences are containers)"

Quote
Scriptname XX_temp extends activemagiceffect  
 
Event OnEffectStart(Actor akTarget, Actor akCaster)
    Int iFormIndex = akTarget.GetNumItems()
    Int total = 0
    While iFormIndex > 0
        iFormIndex -= 1
        Form kForm = akTarget.GetNthForm(iFormIndex)
        total += kForm.GetGoldValue() * akTarget.GetItemCount(kForm)
    EndWhile
     Debug.MessageBox(total)
endEvent
 
XX_temp.psc(4,27😞 GetNumItems is not a function or does not exist
XX_temp.psc(4,5😞 type mismatch while assigning to a int (cast missing or types unrelated)
XX_temp.psc(8,24😞 GetNthForm is not a function or does not exist

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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