Log in

View Full Version : Invalid parameter string( bug in filter)


vcmohan
3rd October 2005, 14:12
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

extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env)
{
env->AddFunction("NeuralNet", "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]s", Create_NeuralNet, 0);

return "NeuralNet Plugin";
}

The last parameter activate was added new.
What error I am committing? There are 33 parameters in string

sh0dan
3rd October 2005, 14:33
The compiler could add some whitespace at your linebreaks.

Manao
3rd October 2005, 18:52
Indeed : the correct to write strings on multiple lines is :"blablabla"
"blablabla"
"blablabla"The compiler will concat the string together ( "a" "b" = "ab" )

vcmohan
4th October 2005, 02:59
The 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?

stickboy
4th October 2005, 03:40
I 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.

vcmohan
6th October 2005, 03:43
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:


....."
c // input clip
c // reference clip
[type] s // type of correlation "auto" "cross"
[test] b // is this a test run?
"
.........


Now its possible to do this as suggested by manao which means one need to put quotes and delete all white spaces.

Leak
6th October 2005, 09:19
How about this?

...
"c" // input clip
"c" // reference clip
"[type]" "s" // type of correlation "auto" "cross"
"[test]" "b" // 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)

stickboy
6th October 2005, 10:24
for 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.

vcmohan
7th October 2005, 03:49
No, 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.

Bidoche
7th October 2005, 16:27
If some work should be done there, better allow to read from xml.
Better for future extensibility.