Background for Skyrim SE
Member of the SPE_Utility script
boolfunctionSort_Int(int[]arr, stringlua)NativeGlobal

Description

Documentation Comment

Sort arr using a comparison function: "compare(a, b)" in place, the array is modified in-place, returns true on success
Example: Sort_Int(arr, "function compare(a, b) return a <= b end") would sort arr in descending order
"lua" can also be a filepath to a .lua file containing the function, relative to Skyrim.exe


Caveats


Parameters

int[]arr

stringlua


Examples

Auto-Generated Example

int[] myIntArray__arr
string myString__lua

bool returnedValue = SPE_Utility.Sort_Int(myIntArray__arr, myString__lua)
Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.