Your code logic is what's wrong here, not the Clamp() function. How do you expect to have 0 to 255 results if in the 2nd bang you keep adding (and subtracting, in the other mouse scroll action) 5 to the correctly clamped value from the 1st bang?I've not long started and am stuck as to why the Clamp function isn't working correctly. It allows the setting to go below zero, to -5 and up to 260 despite being clamped from 0-255. What's wrong here that doesn't affect the other skins I use it on? I just don't get it!![]()
Code:
MouseScrollUpAction=[!SetVariable #CURRENTSECTION# (Clamp([#[#CURRENTSECTION]],0,255))][!SetVariable #CURRENTSECTION# ([#[#CURRENTSECTION]]+5)]
I won't talk about percentages, the matter hardly requires any explanation, really. Plus, you seem to have solved it already.
Statistics: Posted by Yincognito — Today, 6:11 pm