Re: [Gimp-developer] "Error: unmatched parentheses: 1" in a Scheme Script that looks fine

2007-03-10 Thread Kevin Cozens
Shlomi Fish wrote:
> I'm trying to load the following script using gimp-2.3.14-2mdv2007.1:
> 
> http://www.shlomifish.org/Files/files/code/gimp/fierysteel.scm
> 
> However, I'm getting the following errors on STDERR:
[snip]
> Error: unmatched parentheses: 1
> 
> Now, the script looks fine too me, and the error is not descriptive enough 
> for 
> me to tell where the problem is exactly. Thus, two things are in order:

> 1. Tell me what's wrong with the script.

The script contains three accented characters that do not appear to be valid 
UTF-8 coded characters. Since they appear inside a comment block they 
shouldn't be the cause of the problem.

I think the issue might be related to a comment line right before a close 
parenthesis. I've seen that happen before but thought it was fixed in one of 
the TinyScheme updates. I suspect the root of the problem is due to token() 
calling itself when it gets to the end of a comment line. I plan to eliminate 
the recursive use of token() and see if the problem goes away (assuming I can 
reproduce the problem to start with).

> 2. Fix script-fu or tiny-fu so it will give a more descriptive error in that 
> case.

If my proposed fix for 1. (above) fixes the problem, you won't see this error 
except when you really do have a mismatch in the number of ( and ) in a script.

-- 
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  |  -Pinkutus & the Borg
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] "Error: unmatched parentheses: 1" in a Scheme Script that looks fine

2007-03-10 Thread saulgoode
Quoting Shlomi Fish <[EMAIL PROTECTED]>:

> Hi all!
>
> I'm trying to load the following script using gimp-2.3.14-2mdv2007.1:
>
> http://www.shlomifish.org/Files/files/code/gimp/fierysteel.scm
>
> ...snipped...
>
> 1. Tell me what's wrong with the script.
>
> 2. Fix script-fu or tiny-fu so it will give a more descriptive error in that
> case.

1. That error would seem to be caused by the character encoding of the  
word, "ÄKSÖN". Particularly, the "Ö". I would recommend removing the  
word (as well as the word, "Äydx"; though that doesn't seem to cause  
problems).

There would seem to be a few other updates needed to make the script  
function. First, the following variables need to be reserved in the  
initial 'let*' statement:

  (tmp-layer)
  (bump-layer)
  (fire-layer)
  (fire1-layer)
  (fire2-layer)
  (fire3-layer)
  (turbul-layer)
  (turbul2-layer)
  (sendtog)

The 'verbose' function call should be commented out. (Perhaps Kevin  
Cozens should consider adding it to the list compatibility functions?  
even as a 'no op')

Finally, the two 'plug-in-displace' function calls need to have their  
last argument ("CARTESIAN") removed.


Even with the above changes, the script does not seem to produce the  
intended result; but it will execute.



___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer