Hide VFormat() for SourcePawn 2 plugins.

VFormat() does not work in the v2 VM. Instead, there is a new "spread"
operator, so regular Format or FormatEx will work instead.
This commit is contained in:
David Anderson
2026-09-01 18:58:42 -07:00
parent 8033a8e134
commit 65ce00763a
6 changed files with 23 additions and 2 deletions
+3
View File
@@ -230,6 +230,9 @@ static cell_t sm_format(IPluginContext *pCtx, const cell_t *params)
static char g_vformatbuf[2048];
static cell_t sm_vformat(IPluginContext *pContext, const cell_t *params)
{
if (pContext->GetBaseRuntime()->AsV2() != nullptr)
return pContext->ThrowNativeError("VFormat is not supported in SourcePawn 2 plugins");
int vargPos = static_cast<int>(params[4]);
/* Get the parent parameter array */