[Gimp-user] Error while executing script (Script Stop Working in Windows 2.6.3)

Kevin Cozens kevin at ve3syb.ca
Sat Dec 13 10:58:16 PST 2008


D.Jones (aka) Capnhud wrote:
> 	  (colors (+ segments (if (= inSmooth TRUE) 1 0)))
[snip]
> 	(while (< counter segments)	
> 	    (gimp-gradient-segment-set-left-color theGradient counter (car (gimp-image-pick-color img inLayer counter 0 FALSE FALSE 0)) 100)
> 	    (gimp-gradient-segment-set-right-color theGradient counter (car (gimp-image-pick-color img inLayer (+ counter (if (= inSmooth TRUE) 1 0)) 0 FALSE FALSE 0)) 100)
> 		(set! counter (+ counter 1))
> 	)
[snip]
> what is the correct type for argument 3?

The procedure database indicates that a FLOAT (ie. a numerical value) is 
expected for argument 3 of gimp-image-pick-color. Your problem is due to 
invalid use of the "=" operator in the two if statements shown above.

Your code has "(if (= inSmooth TRUE) 1 0)" where in Smooth is a boolean value 
provided by the SF-TOGGLE. The "=" operator is for use when comparing numbers, 
not booleans. Since inSmooth is a boolean, change your if statement to read
	(if inSmooth 1 0)

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/           |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172      |"Same thing we always do, Pinkutus:
                                 |  Try to assimilate the world!"
#include <disclaimer/favourite> |              -Pinkutus & the Borg


More information about the Gimp-user mailing list