MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / smn_PbAddString

Function smn_PbAddString

core/smn_protobuf.cpp:663–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663static cell_t smn_PbAddString(IPluginContext *pCtx, const cell_t *params)
664{
665 GET_MSG_FROM_HANDLE_OR_ERR();
666 GET_FIELD_NAME_OR_ERR();
667
668 char *strValue;
669 pCtx->LocalToString(params[3], &strValue);
670
671 if (!msg->AddString(strField, strValue))
672 {
673 return pCtx->ThrowNativeError("Invalid field \"%s\" for message \"%s\"", strField, msg->GetProtobufMessage()->GetTypeName().c_str());
674 }
675
676 return 1;
677}
678
679static cell_t smn_PbAddColor(IPluginContext *pCtx, const cell_t *params)
680{

Callers

nothing calls this directly

Calls 3

GetProtobufMessageMethod · 0.80
AddStringMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected