{"name":"selectMin","operator":null,"title":"selectMin","type":"command","url":"https://community.bistudio.com/wiki/selectMin","revid":377100,"updated":"2026-01-01T09:58:18Z","groups":["Arrays"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.66"}],"since":{"game":"arma3","name":"Arma 3","version":"1.66"},"arma3_since":"1.66","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the array element with minimum numerical value. Engine solution to BIS_fnc_lowestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only.  Booleans however are also supported and will be evaluated as Numbers: true - 1, false - 0. nil value treated as 0.\n\n> [!WARNING]\n> Other non Number elements (not recommended) will be evaluated as 0 and **Bad conversion: scalar** message will be logged into .rpt.","syntaxes":[{"syntax":"selectMin array","since":null,"effect":null,"exec":null,"params":[{"name":"array","type":"Array of Numbers","optional":false,"default":null,"description":null,"types":["Array","Number"],"since":null,"text":"array: Array of Numbers"}],"returns":{"type":"Number","types":["Number"],"description":"element with minimum numerical value","text":"Number - element with minimum numerical value"},"form":"unary","operator":null,"left":null,"right":{"text":"array","types":["Array","Number"]}}],"examples":[{"text":"```sqf\n_min = selectMin [1,2,3,4,5]; //1\n```","code":["_min = selectMin [1,2,3,4,5]; //1"]},{"text":"```sqf\n// Same as, for example: \n_min = _a min _b min _c min _d;\n// Only faster:\n_min = selectMin [_a,_b,_c,_d];\n```","code":["// Same as, for example: \n_min = _a min _b min _c min _d;\n// Only faster:\n_min = selectMin [_a,_b,_c,_d];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["selectMax","min","max","selectRandom","select","selectRandomWeighted"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Arrays","Introduced with Arma 3 version 1.66","Scripting Commands"]}