Error: Not enough arguments? - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: Error: Not enough arguments? (/Thread-Error-Not-enough-arguments) |
Error: Not enough arguments? - Pocholo - 04-18-2020 I'm trying to self-taught about writing a script-fu script in GIMP and trying to create a simple script, a "New image". When I'm trying to run it it will give me the error "Not enough arguments". What am I missing? Thank you in advanced. Code: (define (script-fu-new-image theImage theLayer) RE: Error: Not enough arguments? - Ofnuts - 04-18-2020 What is that theLayer variable that you use? RE: Error: Not enough arguments? - JimmyMarco - 04-19-2020 Hello Pocholo, The problem is : your script has two different layers names : baseLayer and theLayer Only one is needed : theLayer Other details : - None argument has to be passed to your script, so "construtor" is only the script name - Undo group (start/end) is useful when a script modify an image, for image generator use undo (disable/enable) - Indent with tabs instead of spaces - Comment to explain what the code does Have fun. @+++ Code: ; "New Image" image generator (new-image.scm) RE: Error: Not enough arguments? - Ofnuts - 04-19-2020 (04-19-2020, 07:44 AM)JimmyMarco Wrote: - Indent with tabs instead of spaces In 2020, your editor takes care of that. I use a tab key, and the editor puts spaces, if fact the editor handles the indentation. Tabs don't survive long in non-programming editors, and if you copy/paste code with tabs here it can get mangled. RE: Error: Not enough arguments? - Pocholo - 04-21-2020 Hi everyone, I hope everything is fine and your family, be safe. I want to thank you for your respond @ the Gimp-forum.net. You explained in simple ways how to write a GIMP script to an old man that is trying to learn at this age, the script-fu world . I created my first script out a tutorial I found in deviantart.com called "Create a seamless Wood Slat Pattern with GIMP 2.10" by Conbagui. I almost done with the script, but I have an error "unbound variable: drawable" when the "plug-in-make-seamless" runs. What am I missing? I uploaded the image and the code. Thank you once again. https://imgur.com/kKnzQOC Code: ; following steps in seamless Wood Slat Pattern tutorial by conbagui RE: Error: Not enough arguments? - Ofnuts - 04-21-2020 A parameter of your call is a drawable variable from the 7th dimension, it should be instead one of your existing drawables/layers (he one with the final design, likely). RE: Error: Not enough arguments? - Kevin - 04-21-2020 When you do gimp-image-merge-down it creates a new layer, so you need to find out what this is so it can be passed to plug-in-make-seamless. For example I re-used theLayer as it doesn't exist after the merge down: Code: (set! theLayer (car (gimp-image-merge-down theImage theDesign 1))) RE: Error: Not enough arguments? - Pocholo - 04-21-2020 Thank you everyone, for all the pointers and explanations. You guys are awesome! |