You could try something like:
Code:
GetLowestValID(begin, end, arr[])
{
new ilow = begin;
new vlow = arr[begin];
for (new i = begin; i <= end; ++i)
{
if (arr[i] < vlow)
{
vlow = arr[i];
ilow = i;
}
}
return ilow;
}
Then, you could use:
Code:
new i = GetLowestValID(1 /* 1 is the first index to test */, 32 /* 32 will be the last index that is checked */, array);
(untested)
__________________