View Single Post
Old 15th February 2011, 10:45   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by TheProfileth View Post
Code:
try {
  Prewparams = Eval(prefilter + "(c, " + params1 + ")")
}
catch(err_msg) {
  Prewoparams = Eval(prefilter + "(removegrain(0)")
}

prefiltered = (params1=="") ? Prewoparams: Prewparams
There's something wrong with your logic here as (depending on the try) either Prewoparams or Prewparams is undefined, and that is independent of params1 being empty. Also, removegrain is called without a clip and there is an unmatched bracket.
Perhaps what you mean is
Code:
try {
  prefiltered = Eval(prefilter + "(c, " + params1 + ")")
}
catch(err_msg) {
  prefiltered = Eval(prefilter + "(c.removegrain(0))")
  # or perhaps just prefiltered = c.removegrain(0) ???
}
Similarly for postfiltering.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote