I found the problem and temporarily fixed it until jes wants to make an official fix. If anyone wants the fixed file, I'll give it
here.
The reason it didn't work is because when it was trying to call the function to get a random item, it was calling the wrong function.
function getRandomItemColorBased(%colorID)
but it was trying
%item = getRandomItemColorBase(%colorID);