Looking very good, although I can't see where you've defined "i". I'm assuming you're iterating through every item in the array - i being each iteration number. With every cycle you're increasing i by 1.
You could use a 'for' loop instead, which does this for you automatically. Also be careful not to miss any open and closing brackets (added below).
for "_i" from 0 to _arrayLength do
{
if (((_magazines select _i) select 3 == 1) and ((_magazines select _i) select 2 == true)) then
{
_pCurMag = (_magazines select _i) select 0;
_pMagAmmo = (_magazines select _i) select 1;
}
};
Also, the Biki is down at the moment so I don't know exactly what magazinesAmmoFull returns.