2 ms·function mod0(x, y) return (x % y) + 1 end Something like this? You replace % with mod0()by caligian 3y agofunction mod0(x, y) return (x % y) + 1 end Something like this? You replace % with mod0()