L L4D2node

CDmxKeyValues2ErrorStack::ReportError

0x00beb2c0 · 258 bytes · __thiscall

_ZN24CDmxKeyValues2ErrorStack11ReportErrorEPKcz

Decompiled

undefined (2 params)

/* CDmxKeyValues2ErrorStack::ReportError(char const*, ...) */

void __thiscall
CDmxKeyValues2ErrorStack::ReportError(CDmxKeyValues2ErrorStack *this,char *param_1,...)

{
  short sVar1;
  undefined4 uVar2;
  int iVar3;
  int in_GS_OFFSET;
  undefined4 uVar4;
  char *pcVar5;
  short local_822;
  char local_820 [2048];
  int local_20;
  
  pcVar5 = local_820;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_vsnprintf(pcVar5,0x800,param_1,&stack0x0000000c);
  iVar3 = 0;
  uVar4 = *(undefined4 *)(this + 0x84);
  uVar2 = *(undefined4 *)(this + 0x80);
  Warning("%s(%d) : %s\n",uVar2,uVar4,pcVar5);
  if (0 < *(int *)(this + 0x8c)) {
    do {
      while (sVar1 = *(short *)(this + iVar3 * 2), sVar1 == -1) {
LAB_00beb355:
        iVar3 = iVar3 + 1;
        if (*(int *)(this + 0x8c) <= iVar3) goto LAB_00beb3a4;
      }
      local_822 = sVar1;
      if (iVar3 < *(int *)(this + 0x88)) {
        uVar2 = CUtlSymbolTable::String((CUtlSymbolTable *)m_ErrorSymbolTable,&local_822);
        Warning("%s, ",uVar2,uVar4,pcVar5);
        goto LAB_00beb355;
      }
      uVar2 = CUtlSymbolTable::String((CUtlSymbolTable *)m_ErrorSymbolTable,&local_822);
      iVar3 = iVar3 + 1;
      Warning("(*%s*), ",uVar2,uVar4,pcVar5);
    } while (iVar3 < *(int *)(this + 0x8c));
  }
LAB_00beb3a4:
  Warning(&DAT_00cff71e,uVar2,uVar4,pcVar5);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)