1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/core/smn_core.cpp Fri Mar 02 19:10:44 2007 +0000
1.3 @@ -0,0 +1,35 @@
1.4 +/**
1.5 + * ===============================================================
1.6 + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.7 + * ===============================================================
1.8 + *
1.9 + * This file is not open source and may not be copied without explicit
1.10 + * written permission of AlliedModders LLC. This file may not be redistributed
1.11 + * in whole or significant part.
1.12 + * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
1.13 + *
1.14 + * Version: $Id$
1.15 + */
1.16 +
1.17 +#include "sm_globals.h"
1.18 +#include "sourcemod.h"
1.19 +
1.20 +static cell_t ThrowError(IPluginContext *pContext, const cell_t *params)
1.21 +{
1.22 + char buffer[512];
1.23 +
1.24 + g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 1);
1.25 +
1.26 + if (pContext->GetContext()->n_err == SP_ERROR_NONE)
1.27 + {
1.28 + pContext->ThrowNativeErrorEx(SP_ERROR_ABORTED, "%s", buffer);
1.29 + }
1.30 +
1.31 + return 0;
1.32 +}
1.33 +
1.34 +REGISTER_NATIVES(coreNatives)
1.35 +{
1.36 + {"ThrowError", ThrowError},
1.37 + {NULL, NULL},
1.38 +};