i could definetly just copy/paste my logic, and that'd work just fine, but rather than doing the easy thing, i want to learn the more efficient way.
i tried the following, with no effect;
function logic(current,maxium,next) if arrow == "up" then if (current > 1) and (current <= maximum) then elseif current == 1 then current = maximum elseif current == 0 then current = 1 end elseif arrow == "down" if (current >= 1) and (current < maximum) then elseif current == maximum then current = 1 elseif current == 0 then current = maximum end end return end
i know that the code goes wrong whenever i write "current ="
but i'm not sure how to change the value of current, when current itself is a variable of an index's value.











