ResizeIntArray - Utility: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
No edit summary
m (Convert source tags to syntaxhighlight)
 
Line 7: Line 7:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
int[] Function ResizeIntArray(int[] source, int size, int fill = 0) global native
int[] Function ResizeIntArray(int[] source, int size, int fill = 0) global native
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 20: Line 20:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; let's make array length equal to available perk points, and fill all elements with 9
; let's make array length equal to available perk points, and fill all elements with 9
; ...this should really be using the "create" function, not "resize"
; ...this should really be using the "create" function, not "resize"
Line 36: Line 36:


someArray = Utility.ResizeIntArray(someArray, someArray.Length - 1)
someArray = Utility.ResizeIntArray(someArray, someArray.Length - 1)
</source>
</syntaxhighlight>


== Notes ==
== Notes ==

Navigation menu