L L4D2node

CSave::WriteString

0x004a7ef0 · 90 bytes · __thiscall

_ZN5CSave11WriteStringEPK8string_ti

Decompiled

undefined (3 params)

/* CSave::WriteString(string_t const*, int) */

void __thiscall CSave::WriteString(CSave *this,string_t *param_1,int param_2)

{
  size_t sVar1;
  int iVar2;
  char *__s;
  int iVar3;
  
  iVar3 = 0;
  if (0 < param_2) {
    do {
      __s = *(char **)(param_1 + iVar3 * 4);
      if (__s == (char *)0x0) {
        iVar2 = 1;
        __s = "";
      }
      else {
        sVar1 = strlen(__s);
        iVar2 = sVar1 + 1;
      }
      iVar3 = iVar3 + 1;
      BufferData(this,__s,iVar2);
    } while (iVar3 != param_2);
  }
  return;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)