Just passing by to let you know that I managed to adapt our code with success. Turned out that I forgot to declare that "i=0" at the top of the code. Now it works like a charm.
Thank you so much for your help and patience!
Develop games in your browser. Powerful, performant & highly capable.