But my problem was caused by the following line:
which should've been:for (var i = 1; i < iCount; i++)
Still... thanks for the reply Loïc!for (var i = 1; i <= iCount; i++)
which should've been:for (var i = 1; i < iCount; i++)
Still... thanks for the reply Loïc!for (var i = 1; i <= iCount; i++)