int iPinNum = GetRandomInt(0, eItems_GetPinsCount() -1); int iPinDefIndex = eItems_GetPinDefIndexByPinNum(iPinNum);