Fixing issue with debug builds not working

This commit is contained in:
James Mitchell 2020-12-13 14:44:23 +11:00
parent 046391ef25
commit 782721edd4

View File

@ -1579,8 +1579,6 @@ struct ScriptHook_t
{ {
extern IScriptVM *g_pScriptVM; extern IScriptVM *g_pScriptVM;
Assert( ARRAYSIZE(pArgs) == m_desc.m_Parameters.Count() );
// Make sure we have a function in this scope // Make sure we have a function in this scope
if (!m_hFunc && !CanRunInScope(hScope)) if (!m_hFunc && !CanRunInScope(hScope))
return false; return false;
@ -1638,6 +1636,7 @@ public:
if ( !m_hScriptFunc_##FuncName.IsNull() ) \ if ( !m_hScriptFunc_##FuncName.IsNull() ) \
{ \ { \
ScriptVariant_t returnVal; \ ScriptVariant_t returnVal; \
Assert( N == m_desc.m_Parameters.Count() ); \
ScriptStatus_t result = Call( m_hScriptFunc_##FuncName.hFunction, &returnVal, FUNC_CALL_ARGS_##N ); \ ScriptStatus_t result = Call( m_hScriptFunc_##FuncName.hFunction, &returnVal, FUNC_CALL_ARGS_##N ); \
if ( result != SCRIPT_ERROR ) \ if ( result != SCRIPT_ERROR ) \
{ \ { \
@ -1662,6 +1661,7 @@ public:
\ \
if ( !m_hScriptFunc_##FuncName.IsNull() ) \ 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 ); \ ScriptStatus_t result = Call( m_hScriptFunc_##FuncName.hFunction, NULL, FUNC_CALL_ARGS_##N ); \
if ( result != SCRIPT_ERROR ) \ if ( result != SCRIPT_ERROR ) \
{ \ { \