Re: [nbos] [FM] Scripting help needed
"Christopher Rodrigues Macias"
Tue Jul 17th, 2007
Thanks very much, Joe. I ran the command line as you suggested and got the following:

c:\program files\Mapper8\Plugins\LayerSort.FMScript(1, 1) Microsoft VBScript compilation error: Expected statement

That’s it. Not very enlightening. Even more puzzling is that, when I ran the tool over a couple of the scripts supplied with FM (such as RandomBuilding.FMScript) it gave the exact same message, although I know those scripts are working properly in the tool.

I’m baffled. Maybe it’s my setup. Any suggestions?



From: [] On Behalf Of Joe Frazier, Jr
Sent: Tuesday, 17 July 2007 8:53 AM
Subject: Re: [nbos] [FM] Scripting help needed

Christopher Rodrigues Macias wrote:

I need some help/advice with an FM scripting issue. I’m trying to adapt a script I wrote for FM7 (the ‘LayerSort’ script) to run as a plug-in in FM8, but it just gives me a cryptic dialog that says “Microsoft VBScript compilation error” and refuses to run. I have two questions.

This means there is some invalid syntax in the file. Perhaps a character where there should not be or something like that

First, what do people use to debug scripts like this? Is VisualStudio my only option? I’m not opposed to using VisualStudio, I just can’t justify spending a ton of cash just so I can debug FM scripts. Is there some low-cost option for working with VBScript that offers some level of debugging support?

Well, for checking the syntax, just fire up a command prompt:

1. start
2. run
3. type "cmd" (without the quotes)
4. enter. This brings up a command prompt window ala the days of DOS based computers 12 + years ago.
5. type cscript //e:VBScript [path to script] [ENTER]

You enter the path to your script. IF there are spaces, you will need to put the entire path to the script in double qoutes. For example:

cscript //e:VBScript c:\program files\Fractal Mapper\Mapper8\Plugins\Layersort.FMScript

Would not work, but

cscript //e:VBScript "c:\program files\Fractal Mapper\Mapper8\Plugins\Layersort.FMScript"

should at least give you something.

When it runs, it should show you the error and usually the line and column number in parenthesis: (22, 10) would mean the error is "around" line 22, the 10th character.

Second, is there anyone out there who has already figured out how to run LayerSort under FM8?

I was hoping to get your script from the site this week and begin playing with it, so no help as of yet.

Thanks in advance,


Nbossoftware mailing list

Copyright © 2003-2007, NBOS Software. All rights reserved. 'Fractal Mapper', 'ScreenMonkey', 'Character Sketcher', 'Inspiration Pad', 'Fractal World Explorer', 'Goblin API', 'AstroSynthesis' are trademarks of NBOS Software. 'Dwarven Beserker' art by V. Shane.
Member contributed resources