RSS/Atom feed Twitter
Site is read-only, email is disabled

script-fu - ERROR: bad function

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

script-fu - ERROR: bad function Narushima Hironori 11 Jul 07:21
script-fu - ERROR: bad function saulgoode@brickfilms.com 12 Jul 01:42
  script-fu - ERROR: bad function Narushima Hironori 12 Jul 03:04
   script-fu - ERROR: bad function out_of_s@1dk.jp 12 Jul 07:02
    script-fu - ERROR: bad function Narushima Hironori 12 Jul 11:11
Narushima Hironori
2006-07-11 07:21:45 UTC (almost 18 years ago)

script-fu - ERROR: bad function

I write follow script (convert bitmap images to join layer to distribute animated gif file)

But I'm in stagnation. Console display only `ERROR: bad function' and other no hint.

saulgoode@brickfilms.com
2006-07-12 01:42:18 UTC (almost 18 years ago)

script-fu - ERROR: bad function

I think that there exists a problem with the construct of your IF statement.

The format of IF statements in Scheme is:

(if condition do_this_if_true
do_this_if_false
)

For example:

(if (< x 0) (print "X is negative")
(print "X is positive")
)

The "do_this_if_false" is optional but if you wish to do more than one thing, you must use a "(begin" ... ")" statement.

(if (< x 0) (begin
(print "X is negative")
(set! sign -1)
)
(begin
(print "X is positive")
(set! sign 1)
)
)

Narushima Hironori
2006-07-12 03:04:09 UTC (almost 18 years ago)

script-fu - ERROR: bad function

saulgoode@brickfilms.com wrote:

I think that there exists a problem with the construct of your IF statement.

My scheme format might be strange. But that is not relation with error `ERROR: bad function.'

I use The GIMP for Windows (version 2.2.11) in WindowsXPSP2. (binary founded in gimp-win.sourceforge.net)

Does an other platform not output bad function error in (gimp-image-convert-indexed) ???

Thanks.

out_of_s@1dk.jp
2006-07-12 07:02:38 UTC (almost 18 years ago)

script-fu - ERROR: bad function

saulgoode@brickfilms.com wrote:

I think that there exists a problem with the construct of your IF statement.

My scheme format might be strange. But that is not relation with error `ERROR: bad function.'

I think that what saulgoode pointed out DOES meet your trouble. By the error message Gimp told that the value of "(print image)" might not be a function (and never). My poor guess is:

*************** *** 34,40 ****
)
)

! (if (< 0 count) (
(print image) ;; print
(gimp-image-convert-indexed image 0 0 255 FALSE TRUE "") (print image) ;; not print
--- 34,40 ----
)
)

! (if (< 0 count) (begin
(print image) ;; print
(gimp-image-convert-indexed image 0 0 255 FALSE TRUE "") (print image) ;; not print

Narushima Hironori
2006-07-12 11:11:56 UTC (almost 18 years ago)

script-fu - ERROR: bad function

Wow, I modify code by refer follow code to running script! Thank you.

(Difficult to learn new language, but script-fu is very useful. thank you.)

out_of_s@1dk.jp wrote:

I think that what saulgoode pointed out DOES meet your trouble. By the error message Gimp told that the value of "(print image)" might not be a function (and never). My poor guess is:

*************** *** 34,40 ****
)
)

! (if (< 0 count) (
(print image) ;; print
(gimp-image-convert-indexed image 0 0 255 FALSE TRUE "") (print image) ;; not print
--- 34,40 ----
)
)

! (if (< 0 count) (begin
(print image) ;; print
(gimp-image-convert-indexed image 0 0 255 FALSE TRUE "") (print image) ;; not print