void CSquirrel::CompilerErrorFunction(SQVM * pVM, const char * szError, const char * szSource, int iLine, int iColumn) { // Find the script CSquirrel * pScript = g_pScriptingManager->Get(pVM); if(pScript) { // Call the 'scriptError' event CSquirrelArguments arguments; arguments.push(szError); arguments.push(szSource); arguments.push(iLine); arguments.push(iColumn); if(g_pEvents->Call("compilerError", &arguments, pScript).GetInteger() == 1) CLogFile::Printf("Error: Failed to compile script %s on Line %d Column %d (%s).", pScript->GetName().Get(), iLine, iColumn, szError); } }
void CSquirrel::CompilerErrorFunction(SQVM * pVM, const char * szError, const char * szSource, int iLine, int iColumn) { // Find the script CSquirrel * pScript = CScriptingManager::GetInstance()->Get(pVM); if(pScript) { // Call the 'compilerError' event CSquirrelArguments arguments; arguments.push(szError); arguments.push(szSource); arguments.push(iLine); arguments.push(iColumn); if(CEvents::GetInstance()->Call("compilerError", &arguments, pScript).GetInteger() == 1) CLogFile::Printf("Error: Failed to compile script %s (Error: %s (Line %d, Column %d)).", pScript->GetName().Get(), szError, iLine, iColumn); } }