SafeGet<int>
0x0080b2a0 · 138 bytes · __regparm3
_Z7SafeGetIiEbP9HSCRIPT__PKcRT_b.isra.69
Decompiled
bool (4 params)
/* bool SafeGet<int>(HSCRIPT__*, char const*, int&, bool) [clone .isra.69] */
bool __regparm3 SafeGet<int>(HSCRIPT__ *param_1,char *param_2,int *param_3,bool param_4)
{
char cVar1;
void *local_28 [2];
short local_20;
ushort local_1e;
local_1e = 0;
local_20 = 0;
local_28[0] = (void *)0x0;
/* try { // try from 0080b2d8 to 0080b2dd has its CatchHandler @ 0080b330 */
cVar1 = (**(code **)(*g_pScriptVM + 0x90))(g_pScriptVM,param_1,param_2,local_28);
if (cVar1 != '\0') {
if (local_20 == 0) {
cVar1 = '\0';
}
else if (local_20 == 5) {
*param_3 = (int)local_28[0];
}
else {
*param_3 = (int)(float)local_28[0];
}
}
if ((local_1e & 1) != 0) {
free(local_28[0]);
}
return (bool)cVar1;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.