04-23-2016, 10:14 PM
(04-23-2016, 12:03 PM)Shaadaris Wrote: Okay, I officially give up.
I've been trying variants of this code trying to make it work for...
...
2 and a half hours, I think.
If anyone is familiar with Scheme, can you PLEASE tell me why this isn't working???
(note: I am scripting for GIMP)
The problem is that gimp-hue-saturation can't accept values lower than -180 or higher than 180.
When I run the script, it works fine until the hue-offset reaches 210, at which point, due to the conditional, it should wrap around to -150 which is equivalent.
It does not. The execution keeps complaining that I'm feeding it 210, which is greater than 180!
For some reason my conditional seems to be ignored or something??
What should happen is the following:
hue-step is 30 as per my selected settings in the menu (unimportant to this)
hue-change is incremented by multiplication.
hue-offset is then made from hue-change and the hue is offset by that amount
OR if hue-offset is more than 180
hue-offset is added to -360 (it's done weird since I thought maybe the negative number was the problem for a while. It wasn't.) to get -150, -120, -90, etc.
then it does the same procedure as it would have above.
But it doesn't.
And this is pissing me off. I've spent too long trying to learn the basics of this unorthadox language just so I can edit this damn script segment to work the way I want it to, but apparently even that eludes me, probably because of some obscure rule or obvious syntax problem. ARGH!
ASDFGHJKLZXCVBNM
So I was using if wrong.
Because apparently Scheme's if
So I switched to cond, which should be working. Even made the else clause something concrete in case that was tripping it up.
NOPE.
NOPEITY NOPP!
STILL SOMEHOW GETTING THE VALUE 210 PASSED TO gimp-hue-saturation!
WHY?
I DON'T KNOW FUCK YOU IS WHY.
GODDAMNIT I WANT TO PUNCH WHOEVER DEVELOPED THIS BACKWARDS LANGUAGE.
I HAVE GONE THROUGH SO MANY VAGUE RESOURCES AND NONE OF WHY THIS ISN'T WORKING MAKES SENSE.
This is crap. This is total crap.
I might have to finally give in and make a Stack Exchange account for this. Though if I do I expect either no help or a bunch of people throwing scheme technobabble at me like I'll understand it. Neither of which would be any use.
[/rage]