GIMP Home
How to get GIMP?
I noticed
Addition
Materials
Useful Plugins
Plugin details
script-fu link
Update log
 
Logo1
Logo2
Others1
Others2
Useful script-fu
Useful script-fu2
Useful script-fu3
Useful script-fu4
Syntax of script-fu
Error!!
compare version
 
Gallery
 
 
Home


About errors of script-fu

When you're receiving errors??
  1. Try to work not exist layers.
    Example
    (gimp-image-merge-visible-layers img 0)
    :
    (gimp-layer-resize layer1 width height 0 0)
    If layer1 was visible, layer1 merged and not exist, so it is an error.
  2. Used wrong variable.
    Example
    (gimp-message a)
    If you wanna receive message a, it is "a", if you wanna watch the value of a, it is (number->string a).
  3. Set impossible number of plugins.
  4. After GIMP2.0, before (gimp-image-add-layer img layer1 0), change layer-size or add some plug-ins effects, it's an error. (Only GIMP1.2 can use this).
  5. Used not declared variable.
    Example
    (gimp-layer-resize layer1 tate yoko 0 0)
    layer1, tate and yoko should declare.

    The right answer
    (let* (
        (yoko (car (gimp-drawable-width drawable)))
        (tate (car (gimp-drawable-height drawable)))
        (layer1 (car (gimp-layer-new img width height RGB_IMAGE "Background" 100 NORMAL)))
      )
    :
    :
    )
  6. Not close bracket. I think this mistake many people did. If too much left bracket used, declared variable treated error, and if too much right bracket used, in script-fu menu scm name doesn't come out.
  7. Declared variable is too few. Message is "too few arguments". If used plug-ins variable is too few, it's an error.
  8. Syntax error. Message is "bad function".
    Example
    (if (= a 0) set! (a 1))
     
    The right answer
    (if (= a 0) (set! a 1))
  9. About gimp2.6, if "Bad syntax of binding spec in let : (layer1)" showed, change (layer1) to (layer1 0).

GIMP


kikidide@gmail.com