RefMapArrayGetNext

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns an array_var with the next Key::Value pair in the specified RefMap Array. This is the pair immediately following the one that was returned by the last call to this function, or to RefMapArrayGetFirst. If no pair follows, the function returns ar_Null.

The first element in the returned array is the Key (reference type), and the second element is the Value (float/reference/string type).

Syntax

[help]
(array_var) RefMapArrayGetNext arrName:string 

Or:

(array_var) RefMapNext arrName:string

Example

let aKeyValue := RefMapArrayGetNext "someRefMap"
let aKeyValue := RefMapNext "someRefMap"
array_var aArray
ref rKey
string_var s_Value

let aArray := RefMapArrayGetFirst "*SomeRefMap"
while (aArray != Ar_NULL)
   let rKey := aArray[0]
   let s_Value := aArray[1]  ;* Assumes the type of the value is a string here, i.e RefMapArraySetString was used all of the time for this RefMap.
   ;* If unsure, can check the type of the value using TypeOf
   
   ;* do stuff
   
   let aArray := RefMapArrayGetNext "*SomeRefMap"
loop

See Also