From 09c1471c3a3f47824d4ae9da10ff23aba4a117d3 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Thu, 4 Nov 2004 21:55:14 +0000 Subject: [PATCH] normal (not SP) forwards now report runtime errors properly --- amxmodx/CForward.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/amxmodx/CForward.cpp b/amxmodx/CForward.cpp index 7c0fe2c0..4bbbc66b 100755 --- a/amxmodx/CForward.cpp +++ b/amxmodx/CForward.cpp @@ -244,7 +244,11 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays) // exec cell retVal; - amx_Execv(m_Amx, &retVal, m_Func, m_NumParams, realParams); + int err = amx_Execv(m_Amx, &retVal, m_Func, m_NumParams, realParams); + + // log runtime error, if any + if (err != AMX_ERR_NONE) + LogError(m_Amx, err, ""); // cleanup strings & arrays for (i = 0; i < m_NumParams; ++i)