- Code: Select all
void ChangeSwitch(int AR, int VALUE) {
SWITCH[AR]=min(VALUE, max(SWITCH[AR], 1));
}
Now how would I go about limiting it without using an if statement or too much code?
I also tried
- Code: Select all
VALUE=min(0, max(VALUE, 1));
but that doesn't work either. (This code placed above switch[ar] code)