I'm doing rework on Dias's plugin that will follow
this
But it has a weird situation.
Code:
new g_iszWeaponKey
public plugin_precache() {
// ...
g_iszWeaponKey = engfunc(EngFunc_AllocString, WEAPON_NAME);
server_print("..., Key: %d %s", g_iszWeaponKey, g_iszWeaponKey);
// ...
}
this print to the server (from 2 plugins) has same %d and empty string %s
Code:
//WEAPON_NAME weapon_dargoncannon
Key: -74022417 <= empty string
//WEAPON_NAME weapon_papin
Key: -74020417 <= empty string
Besides that, no error nor warning shows.
Another part that uses EngFunc_AllocString works normally
Code:
Weapon_Create(const Float: vecOrigin[3] = {0.0, 0.0, 0.0}, const Float: vecAngles[3] = {0.0, 0.0, 0.0}) {
new iWeapon;
static iszAllocStringCached;
if (iszAllocStringCached || (iszAllocStringCached = engfunc(EngFunc_AllocString, WEAPON_REFERANCE))) {
iWeapon = engfunc(EngFunc_CreateNamedEntity, iszAllocStringCached);
server_print("Key: %d %s", iszAllocStringCached, iszAllocStringCached)
}
// ...
}
Printed different per string, %d and %s
Code:
// WEAPON_REFERANCE weapon_ump45
Key: -74012316 dweapon_ump45
// WEAPON_REFERANCE weapon_knife
Key: -74012329 9weapon_knife
Anyone here knows about this situation?
(I'm using ReHLDS, ReAPI and AmxModX ver 1.9.0.5)