mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
41 lines
704 B
Plaintext
41 lines
704 B
Plaintext
/*
|
|
* Author: ?
|
|
* ?
|
|
*
|
|
* Arguments:
|
|
* ?
|
|
*
|
|
* Return Value:
|
|
* ?
|
|
*
|
|
* Public: ?
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
private ["_hash", "_keys", "_hashes", "_values"];
|
|
|
|
params ["_hashList", "_index"];
|
|
|
|
ERRORDATA(2);
|
|
_hash = nil;
|
|
try {
|
|
if(VALIDHASH(_hashList)) then {
|
|
_keys = _hashList select 0;
|
|
_hashes = _hashList select 1;
|
|
if(_index < (count _hashes)) then {
|
|
_values = _hashes select _index;
|
|
|
|
_hash = [_keys, _values, 1];
|
|
} else {
|
|
ERROR("Index of hashlist is out of range");
|
|
};
|
|
} else {
|
|
ERROR("Input hashlist is not valid");
|
|
};
|
|
} catch {
|
|
HANDLECATCH;
|
|
};
|
|
|
|
if (isNil "_hash") exitWith { nil };
|
|
_hash;
|