Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scheme : error in vector
#1
Hello,

I need to write a script for GIMP and I'm stuck on an error I don't understand.

I haven't found a solution to this problem.

Here's an example of a script that returns an error in a console schema:


Code:
(define
myvector (vector 'a 'b 'c 'd 'e)
)
(vector-set! myvector 2 'x)
Error: vector-set!: index must be exact: 2


Where is my error?

Thank you for your help.
Reply
#2
If you download the zip file https://programmer97.byethost10.com/File...ndCrop.zip, look in folder StraightenAndCrop_scm_GV3 at StraightenAndCrop_scm_GV3.scm and search for all references to maximize_type_strs it may help you (make sure that you look at the script ending in _GV3 - the earlier script (for V2) doesn't include the vector usage)

(Just noticed that you are using V2.10 - so the above won't work unless you update to V3)
Reply
#3
(Yesterday, 09:26 AM)programmer_ceds Wrote: If you download the zip file https://programmer97.byethost10.com/File...ndCrop.zip, look in folder StraightenAndCrop_scm_GV3 at StraightenAndCrop_scm_GV3.scm and search for all references to maximize_type_strs it may help you (make sure that you look at the script ending in _GV3 - the earlier script (for V2) doesn't include the vector usage)

(Just noticed that you are using V2.10 - so the above won't work unless you update to V3)

Thank you very much for your reply.
I'll look into it.
I think the error comes from tinyscheme, because it works with other scheme interpreters.
Reply


Forum Jump: