Back Forum Reply New

Invalid parameter string( bug in filter)

I have just added a parameter to my plugin NeuralNet and compiled it. However when I try to execute it the function is not loaded and I get a message
Invalid Parameter string (bug in filter). Since the plugin was working before, I tried deleting the new parameter and recompiling it. Still I get the same error.
The parameter string is as follows

Code:
extern quot;Cquot; __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env)
{   env-gt;AddFunction(quot;NeuralNetquot;, quot;cc[sf]i[ef]i[lx]i[ty]i[rx]i[by]i[elx]i[ety]i[erx]i[eby]i\
[white]b[xpts]i[ypts]i[tlx]i[tty]i[trx]i[tby]i[thresh]i[tf]i[wh]f[wo]f[iter]i\
[test]b[minstep]f[bias]i[cwt]i[err]b[nth]i[hnodes]i[bestof]i[activate]squot;, Create_NeuralNet, 0);
   return quot;NeuralNet  Pluginquot;;
}
The last parameter activate was added new.
What error I am committing? There are 33 parameters in string

The compiler could add some whitespace at your linebreaks.

Indeed : the correct to write strings on multiple lines is :quot;blablablaquot;
quot;blablablaquot;
quot;blablablaquot;

The compiler will concat the string together ( quot;aquot; quot;bquot; = quot;abquot; )


Originally Posted by sh0danThe compiler could add some whitespace at your linebreaks.

I thought Avisynth when it examines the string disregards the white spaces. Is there any problem in doing so?


Originally Posted by vcmohanI thought Avisynth when it examines the string disregards the white spaces. Is there any problem in doing so?

I'm not sure where you got that impression.

It would be possible to do that, of course, but there doesn't seem to be a good reason to do it.

Yesterday I posted a reply but now I dont find it. Strange!
I wanted this facility for ease of use, readability and commenting purposes. for instance I should be able to code it as below:

Code:

.....quot;    c    // input clip    c    // reference clip    [type]  s  // type of correlation quot;autoquot; quot;crossquot;    [test]  b  // is this a test run?    quot;
.........
Now its possible to do this as suggested by manao which means one need to put quotes and delete all white spaces.

How about this?

Code:
...   quot;cquot;  // input clip   quot;cquot;  // reference clip   quot;[type]quot;  quot;squot;  // type of correlation quot;autoquot; quot;crossquot;   quot;[test]quot;  quot;bquot;  // is this a test run?
...
I'd think this is close enough to what you wanted, right?

np: Fluke - Groovy Feeling (Make Mine A 99) (Six Wheels On My Wagon)


Originally Posted by vcmohanfor instance I should be able to code it as below:

No, you shouldn't.  Nor should you embed comments within strings.

Use Leak's way.


Originally Posted by stickboyNo, you shouldn't.  Nor should you embed comments within strings.

Use Leak's way.

I understand that there is a way to do as I wanted by putting all units under separate quotes. But if Avisynth can disregard white spaces in this function parameter string it will be all the more easier to code. This is a suggestion only.

If some work should be done there, better allow to read from xml.
Better for future extensibility.
¥
Back Forum Reply New