mahvin wrote:
I'm guessing there are lots of other errors in this script:
My guess is that your guess is correct.
mahvin wrote:
Some instances of the script work, others produce the above error.
And this one:
Error while executing script-fu-abcdugimp-affiche-images-luminescence:
Error: eval: unbound variable: apply-luminescence-entrelats
This would be a good learning opportunity for me, since I seriously want to understand script-fu more clearly. From what I have read at GIMP.org, and other sites, these unbound variables can no longer be declared globally before being defined. I see the example of how the let statement is used, but I am not certain what parts of apply-luminescence-volute and apply-luminescence-entrelats need to be added to a let statement. Would it be everything that is enclosed in parentheses for that variable?
The script is basically well-written and updating it should indeed provide a good learning experience. While the problems you describe are common with older scripts, I believe the situation for this script is different.
Basically, the errors in this script seem to be the result of some incomplete copy-n-pasting of the procedure names. I would speculate that after writing the script, someone decided to change the names of some of the procedures to insert "-abcdugimp-" into the names. The reason for doing this is commendable and I'd like to address this in the next paragraph. Nonetheless, when they changed the names, they did not catch all instances of the old names and this results in mismatches such as the one I addressed in my preceding post. All of these mismatches need to be reconciled.
As to the naming conventions used when defining Script-fu functions, it is useful to have scripts that get registered with Procedural DataBase start with "script-fu-". The reason for this is so that other Script-fu scripts know not to include a 'run mode' (RUN-INTERACTIVE, RUN-NONINTERACTIVE, RUN-WITH-LAST-VALUES) as the first parameter when calling your script, while plug-ins written C/C++, Python, Perl, etc may need to do so. It is also a good idea to include your name or initials in registered Script-fus to avoid conflicts with scripts created by other people. For example, if I name a Script-fu procedure "script-fu-sg-isolate" then it will not interfere with an "isolate" script written by you. The "abcdugimp" appears to have incorporated this practice but were not entirely thorough in their execution.