L L4D2node

Host_Error

0x00175da0 · 224 bytes · __cdecl

_Z10Host_ErrorPKcz

Decompiled

undefined (1 param)

/* Host_Error(char const*, ...) */

void Host_Error(char *param_1,...)

{
  char cVar1;
  int in_GS_OFFSET;
  char local_410 [1024];
  int local_10;
  
  g_HostErrorCount = g_HostErrorCount + 1;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (Host_Error(char_const*,...)::inerror != '\0') {
    Sys_Error("Host_Error: recursively entered");
  }
  Host_Error(char_const*,...)::inerror = 1;
  V_vsnprintf(local_410,0x400,param_1,&stack0x00000008);
  if (DAT_003b8088 == '\0') {
    cVar1 = ThreadInMainThread();
    if (cVar1 == '\0') {
      ConMsg("\nHost_Error: %s\n\n",local_410);
                    /* WARNING: Subroutine does not return */
      Host_AbortServer();
    }
    ConMsg("\nHost_Error: %s\n\n",local_410);
    Host_Disconnect(true);
    Host_Error(char_const*,...)::inerror = 0;
    if (g_bAbortServerSet != '\0') {
                    /* WARNING: Subroutine does not return */
      Host_AbortServer();
    }
  }
  else {
    Sys_Error("Host_Error: %s\n",local_410);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)