The Lab
DATAFILE native

DATAARRAY_GET_COUNT

returns int1 parambuild 1207

Returns the number of elements in the data array arrayData.

Use it as the loop bound when iterating with the other DATAARRAY_GET_* natives.

Signature

C
int DATAARRAY_GET_COUNT(Any* arrayData); // 0x6A885BF69239E539 b1207

Parameters

#NameType
1arrayDataAny* (out pointer)

Facts

Facts about DATAARRAY_GET_COUNT
Name
DATAARRAY_GET_COUNT
Hash
0x6A885BF69239E539
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, arrayData = Citizen.InvokeNative(0x6A885BF69239E539, -- DATAARRAY_GET_COUNT
  Citizen.PointerValueInt(), -- Any* arrayData
  Citizen.ResultAsInteger()
)
print(result, arrayData)
JavaScript
const [result, arrayData] = Citizen.invokeNative("0x6A885BF69239E539", // DATAARRAY_GET_COUNT
  Citizen.pointerValueInt(), // Any* arrayData
  Citizen.resultAsInteger()
);
console.log(result, arrayData)
C#
var arrayDataArg = new OutputArgument();
int result = Function.Call<int>((Hash)0x6A885BF69239E539, // DATAARRAY_GET_COUNT
  arrayDataArg // Any* arrayData
);
int arrayData = arrayDataArg.GetResult<int>();
All DATAFILE natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.