diff --git a/sp/src/public/vscript/ivscript.h b/sp/src/public/vscript/ivscript.h index d5c8ba82..97d47b52 100644 --- a/sp/src/public/vscript/ivscript.h +++ b/sp/src/public/vscript/ivscript.h @@ -1579,8 +1579,6 @@ struct ScriptHook_t { extern IScriptVM *g_pScriptVM; - Assert( ARRAYSIZE(pArgs) == m_desc.m_Parameters.Count() ); - // Make sure we have a function in this scope if (!m_hFunc && !CanRunInScope(hScope)) return false; @@ -1638,6 +1636,7 @@ public: if ( !m_hScriptFunc_##FuncName.IsNull() ) \ { \ ScriptVariant_t returnVal; \ + Assert( N == m_desc.m_Parameters.Count() ); \ ScriptStatus_t result = Call( m_hScriptFunc_##FuncName.hFunction, &returnVal, FUNC_CALL_ARGS_##N ); \ if ( result != SCRIPT_ERROR ) \ { \ @@ -1662,6 +1661,7 @@ public: \ if ( !m_hScriptFunc_##FuncName.IsNull() ) \ { \ + Assert( N == m_desc.m_Parameters.Count() ); \ ScriptStatus_t result = Call( m_hScriptFunc_##FuncName.hFunction, NULL, FUNC_CALL_ARGS_##N ); \ if ( result != SCRIPT_ERROR ) \ { \