MV Repeating script call in textbox?

Hello everyone, I am using RPG Maker MV and have run across a problem. The game I'm working on uses a mana pool system that generates one random mana (out of 5) for each party member alive. I got the basics of the code down but for some reason I cannot get the game to input the results of all 4 (I only get 1 result and item in the textbox).

Does anyone have any suggestions?
I tried using for/while but that didn't seem to work. Is this beyond a simple script code? I'm new to coding so I'm well aware I might have just missed something very simple to make this work. Hopefully someone can help me.

Spoiler: Code
var items = [1, 2, 3, 4, 5];
var index = Math.randomInt(items.length);
var reward = $dataItems[items[index]]

if (items[index] >= 1 && items[index] <= 5); {
$gameParty.gainItem(reward, 2);
$gameMessage.add(reward.name + " was absorbed!")
}

EDIT:
This has been solved, took me many hours but I figured it out! 😀 I mistakenly used for/while when I should have been using do/while. Anyways, this thread can be closed. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/repeating-script-call-in-textbox.133249/