Difference between revisions of "Utility Script"

323 bytes added ,  08:26, 23 June 2023
imported>Bug64
m (segregated beta version functions)
 
Line 102: Line 102:
:'''String [[GetINIString - Utility|GetINIString]](String ''ini'')'''
:'''String [[GetINIString - Utility|GetINIString]](String ''ini'')'''
:*Returns the string value of the associated INI entry.
:*Returns the string value of the associated INI entry.
'''Be careful when using the functions below.''' It is possible to create arrays longer than 128 elements, and ''size'' is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.


:'''Float[] [[CreateFloatArray - Utility|CreateFloatArray]](Int ''size'', Float ''fill'' = 0.0)'''
:'''Float[] [[CreateFloatArray - Utility|CreateFloatArray]](Int ''size'', Float ''fill'' = 0.0)'''
:*Creates and returns a Float array with length ''size'', with each element initialized to ''fill''.
:*Creates and returns a Float array with length ''size'', with each element initialized to ''fill''.
:*'''Be careful when using this function.''' It is possible to create arrays longer than 128 elements, and ''size'' is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.


:'''Int[] [[CreateIntArray - Utility|CreateIntArray]](Int ''size'', Int ''fill'' = 0)'''
:'''Int[] [[CreateIntArray - Utility|CreateIntArray]](Int ''size'', Int ''fill'' = 0)'''
:*Creates and returns an Int array with length ''size'', with each element initialized to ''fill''.
:*Creates and returns an Int array with length ''size'', with each element initialized to ''fill''.
:*'''Be careful when using this function.''' It is possible to create arrays longer than 128 elements, and ''size'' is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.


:'''Bool[] [[CreateBoolArray - Utility|CreateBoolArray]](Int ''size'', Bool ''fill'' = False)'''
:'''Bool[] [[CreateBoolArray - Utility|CreateBoolArray]](Int ''size'', Bool ''fill'' = False)'''
:*Creates and returns a Bool array with length ''size'', with each element initialized to ''fill''.
:*Creates and returns a Bool array with length ''size'', with each element initialized to ''fill''.
:*'''Be careful when using this function.''' It is possible to create arrays longer than 128 elements, and ''size'' is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.


:'''String[] [[CreateStringArray - Utility|CreateStringArray]](Int ''size'', String ''fill'' = "")'''
:'''String[] [[CreateStringArray - Utility|CreateStringArray]](Int ''size'', String ''fill'' = "")'''
:*Creates and returns a String array with length ''size'', with each element initialized to ''fill''.
:*Creates and returns a String array with length ''size'', with each element initialized to ''fill''.
:*'''Be careful when using this function.''' It is possible to create arrays longer than 128 elements, and ''size'' is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.


:'''Form[] [[CreateFormArray - Utility|CreateFormArray]](Int ''size'', Form ''fill'' = None)'''
:'''Form[] [[CreateFormArray - Utility|CreateFormArray]](Int ''size'', Form ''fill'' = None)'''
:*Creates and returns a String array with length ''size'', with each element initialized to ''fill''.
:*Creates and returns a String array with length ''size'', with each element initialized to ''fill''.
:*'''Be careful when using this function.''' It is possible to create arrays longer than 128 elements, and ''size'' is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.


:'''Alias[] [[CreateAliasArray - Utility|CreateAliasArray]](Int ''size'', Alias ''fill'' = None)'''
:'''Alias[] [[CreateAliasArray - Utility|CreateAliasArray]](Int ''size'', Alias ''fill'' = None)'''
:*Creates and returns an Alias array with length ''size'', with each element initialized to ''fill''.
:*Creates and returns an Alias array with length ''size'', with each element initialized to ''fill''.
:*'''Be careful when using this function.''' It is possible to create arrays longer than 128 elements, and ''size'' is treated as an unsigned integer. Negative numbers will produce extremely large values, which can cause major issues.


== Events ==
:'''float[] [[ResizeFloatArray - Utility|ResizeFloatArray]](float[] ''source'', int ''size'', float ''fill'' = 0.0)'''
:*Resizes the ''source'' Float Array to be of length ''size'', in case it is grown, initializes uninitialized elements to ''fill''.
 
:'''int[] [[ResizeIntArray - Utility|ResizeIntArray]](int[] ''source'', int ''size'', int ''fill'' = 0)'''
:*Resizes the ''source'' Int Array to be of length ''size'', in case it is grown, initializes uninitialized elements to ''fill''.
 
:'''bool[] [[ResizeBoolArray - Utility|ResizeBoolArray]](bool[] ''source'', int ''size'', bool ''fill'' = false)'''
:*Resizes the ''source'' Bool Array to be of length ''size'', in case it is grown, initializes uninitialized elements to ''fill''.
 
:'''string[] [[ResizeStringArray - Utility|ResizeStringArray]](string[] ''source'', int ''size'', string ''fill'' = "")'''
:*Resizes the ''source'' String Array to be of length ''size'', in case it is grown, initializes uninitialized elements to ''fill''.
 
:'''Form[] [[ResizeFormArray - Utility|ResizeFormArray]](Form[] ''source'', int ''size'', Form ''fill'' = None)'''
:*Resizes the ''source'' Form Array to be of length ''size'', in case it is grown, initializes uninitialized elements to ''fill''.
 
:'''Alias[] [[ResizeFormArray - Utility|ResizeAliasArray]](Alias[] ''source'', int ''size'', Alias ''fill'' = None)'''
:*Resizes the ''source'' Alias Array to be of length ''size'', in case it is grown, initializes uninitialized elements to ''fill''.
 
 
==Events==
None
None


[[Category:Scripting]]
[[Category:Scripting]]
16

edits