diff --git a/sp/src/vscript/vscript_squirrel.nut b/sp/src/vscript/vscript_squirrel.nut index 5b76bbe3..54492423 100644 --- a/sp/src/vscript/vscript_squirrel.nut +++ b/sp/src/vscript/vscript_squirrel.nut @@ -118,15 +118,14 @@ class CSimpleCallChainer function PostScriptExecute() { - local func; - try { - func = scope[prefix]; - } catch(e) { - return; + if ( prefix in scope ) + { + local func = scope[prefix]; + if ( typeof func == "function" ) + { + chain.push(func); + } } - if (typeof(func) != "function") - return; - chain.push(func); } function Call() @@ -569,4 +568,4 @@ if (developer) __Documentation.RegisterHelp( "Lerp", "float Lerp(float, float, float)", "" ); __Documentation.RegisterHelp( "SimpleSpline", "float SimpleSpline(float)", "" ); } -)vscript"; \ No newline at end of file +)vscript";