Description
Wiki Description
This function counts the number of linked refs that are in a linked Ref chain (example: A is linked to B is linked to C - this function will return 3)
Documentation Comment
jtucker, jduvall
This function counts the number of linked refs that are in a linked Ref chain (ie object is linked to A, A is linked to B, etc. this then counts all the linked refs.)
Often used in conjunction with GetNthLinkedRef()
*** WARNING: Having a link ref chain that at any point loops back on itself and calling this function will result in very bad things. Don't do that!***
Parameters
KeywordapKeyword=NONE
CK Wiki Description
Keyword to check ref link against (see ObjectReference.GetLinkedRef(...).)
intmaxExpectedLinkedRefs=100
CK Wiki Description
Maximum number of expected links. The function stops checking after it finds this many or finishes finding all of them. This is used as a safety precaution to premature bail out of a while loop in cases where something in the linked ref chain links back to something in the chain previously, which would result in an infinite loop.
Examples
; Count the number of refs in a linked ref chain to us
int numLinkedRefs = countLinkedRefChain()Auto-Generated Example
Keyword myKeyword__apKeyword
int myInt__maxExpectedLinkedRefs
int returnedValue = myObjectReference__toCallFunctionOn.countLinkedRefChain(myKeyword__apKeyword, myInt__maxExpectedLinkedRefs)