Difference between revisions of "Ar Cat"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Pintocat
imported>DoctaSax
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Function
{{Function
  |origin = LU
  |origin = LU
  |summary = Concatentates arrays, returning the combined result. JIP NVSE Plugin v40 merged Lutana NVSE plugin v19. '''As of JIPv40, This function's syntax was changed from Lutana v19.'''
  |summary = Concatentates arrays, returning the combined result.  
JIP NVSE Plugin v40 merged Lutana NVSE plugin v19. '''As of JIPv40, This function's syntax was changed from Lutana v19, requiring that you pass the arrays via their IDs (set to integers) if you use the script compiler override (CO).'''
  |name = ar_Cat
  |name = ar_Cat
  |alias = pinto_Cat
  |alias = pinto_Cat
Line 8: Line 9:
   {{FunctionArgument
   {{FunctionArgument
   |Name = baseArrayID
   |Name = baseArrayID
   |Type = int
   |Type = arrayVar
   }}{{FunctionArgument
   }}{{FunctionArgument
   |Name = toAddArrayID
   |Name = toAddArrayID
   |Type = int
   |Type = arrayVar
   }}
   }}
}}
}}


== Example ==
== Example (regular) ==
array_var arrA ; array to add to
array_var arrB ; array to add
 
ar_cat arrA, arrB
 
== Example (with CO) ==
  array_var arrA
  array_var arrA
  array_var arrB
  array_var arrB
Line 23: Line 30:
  set iArrAID to arrA
  set iArrAID to arrA
  set iArrBID to arrB
  set iArrBID to arrB
  let arrA := ar_Cat iArrAID iArrBID
  ar_Cat iArrAID iArrBID




== Old Syntax (Lutana standalone) ==
== Old Syntax (Lutana standalone) ==
  (concatenatedArray) ar_Cat arrayToAddTo:array arrayToAdd:array
  (concatenatedArray) ar_Cat arrayToAddTo:array arrayToAdd:array
== Notes ==
Ar_Cat changes the "to add to" array in place, and will not return anything if you 'let' an arrayVar to it (ie let SomeArray := ar_cat arrayA, arrayB), producing NVSE errors.
An alternative way that only requires NVSE is using ar_insertrange with the index being the size of the base array.


==See Also==
==See Also==
[[Array_Variables]]
*[[Array_Variables]]
*[[Ar_InsertRange]]


[[Category:Functions_(Lutana)]]
[[Category:Functions_(Lutana)]]
[[Category:Array_Functions_(Lutana)]]
[[Category:Array_Functions_(Lutana)]]

Latest revision as of 12:42, 27 March 2017

< [[::Category:Functions|Category:Functions]]

A function added by the Lutana NVSE plugin.

Description

Concatentates arrays, returning the combined result.

JIP NVSE Plugin v40 merged Lutana NVSE plugin v19. As of JIPv40, This function's syntax was changed from Lutana v19, requiring that you pass the arrays via their IDs (set to integers) if you use the script compiler override (CO).

Syntax

[help]
(array) ar_Cat baseArrayID:arrayVar toAddArrayID:arrayVar 

Or:

(array) pinto_Cat baseArrayID:arrayVar toAddArrayID:arrayVar


Example (regular)

array_var arrA ; array to add to
array_var arrB ; array to add
ar_cat arrA, arrB

Example (with CO)

array_var arrA
array_var arrB
int iArrAID
int iArrBID
...
set iArrAID to arrA
set iArrBID to arrB
ar_Cat iArrAID iArrBID


Old Syntax (Lutana standalone)

(concatenatedArray) ar_Cat arrayToAddTo:array arrayToAdd:array

Notes

Ar_Cat changes the "to add to" array in place, and will not return anything if you 'let' an arrayVar to it (ie let SomeArray := ar_cat arrayA, arrayB), producing NVSE errors. An alternative way that only requires NVSE is using ar_insertrange with the index being the size of the base array.

See Also