Hi, I'm trying to do some SDKCalls to the function "CAttributeList::SetOrAddAttributeValueByName " on Linux but it's always giving me this error:
Code:
L 04/20/2020 - 20:03:27: [SM] Exception reported: Invalid Handle 0 (error 4)
L 04/20/2020 - 20:03:27: [SM] Blaming: bot_stuff.smx
L 04/20/2020 - 20:03:27: [SM] Call stack trace:
L 04/20/2020 - 20:03:27: [SM] [0] SDKCall
L 04/20/2020 - 20:03:27: [SM] [1] Line 15663, bot_stuff.sp::SetAttribute
L 04/20/2020 - 20:03:27: [SM] [2] Line 10666, bot_stuff.sp::OnWeaponEquipPost
Here's how I'm doing the SDKCall things:
PHP Code:
hGameConfi = LoadGameConfigFile("attributes.games");
if (hGameConfi == INVALID_HANDLE)
SetFailState("Failed to found attributes.games game config.");
StartPrepSDKCall(SDKCall_Player);
PrepSDKCall_SetFromConf(hGameConfig, SDKConf_Signature, "CAttributeList::SetOrAddAttributeValueByName");
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
hSetAttribute = EndPrepSDKCall();
PHP Code:
public void SetAttribute(int entity, char[] attributename, int value)
{
SDKCall(hSetAttribute, entity, attributename, value);
}
Anyone knows why it's always giving me the Invalid Handle error?
__________________