Difference between revisions of "User:DavidJCobb/Stack dumping"

m
imported>DavidJCobb
imported>DavidJCobb
Line 2: Line 2:


== Overview ==
== Overview ==
Whenever the game engine calls a function, a ''call stack'' is generated. When that function calls another function, the callee is added to the caller's call stack. Papyrus can only have a certain number of call stacks running at a time; if too many stacks accumulate, some may be ''suspended'' (paused). Stacks may also be suspended for other reasons:
Whenever the game engine calls a function, a ''call stack'' is generated. A call stack keeps track of the function's state -- which functions have been called (if X calls Y, Y is added to the X call stack), and what values their variables have. Papyrus can only have a certain number of call stacks running at a time; if too many stacks accumulate, some may be ''suspended'' (paused). Stacks may also be suspended for other reasons:


* A function that calls [[Wait - Utility|Utility.Wait(''n'')]] will suspend its call stack for ''n'' seconds.
* A function that calls [[Wait - Utility|Utility.Wait(''n'')]] will suspend its call stack for ''n'' seconds.
Anonymous user