OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Terox on 24 Jun 2004, 17:09:44
-
Example
ArrayA = [1,2,3,4,5]
ArrayB = [6,7,8,9,10]
ArrayC = [11,12,13,14,15]
Masterarray = [ArrayA,ArrayB,ArrayC]
have tried various coinfigurations of the following line but cant seem to get the syntax correct
Subarraycount = {count _x select 0} foreach Masterarray
answer should be 15
I want to query the Masterarray elements and count the number of subarray elements each has
Thanks in advance for any help offered
-
Try something like this:
SubArrayCount=0
{SubArrayCount=SubArrayCount+(Count _x)} ForEach MasterArray
-
Excellent, thanks a lot, works a treat :)
who do i have to thank??