PHP Code:
L 01/31/2017 - 16:43:22: [SM] Exception reported: Item is NULL. File a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
L 01/31/2017 - 16:43:22: [SM] Blaming: overwatch.smx
L 01/31/2017 - 16:43:22: [SM] Call stack trace:
L 01/31/2017 - 16:43:22: [SM] [0] TF2Items_GiveNamedItem
L 01/31/2017 - 16:43:22: [SM] [1] Line 1421, C:\Users\Allotroprism\Desktop\플러그인 만들기\overwatch.sp::GiveWeapon
L 01/31/2017 - 16:43:22: [SM] [2] Line 1942, C:\Users\Allotroprism\Desktop\플러그인 만들기\overwatch.sp::OnPlayerRunCmd
L 01/31/2017 - 16:43:22: [TF2ITEMS] ---------------------------------------
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> szClassname = tf_weapon_revolver
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iItemDefinitionIndex = 161
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iEntityQuality = 0
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iEntityLevel = 0
L 01/31/2017 - 16:43:22: [TF2ITEMS] ---------------------------------------
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iAttributeDefinitionIndex = 2
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> flValue = 1.250000
L 01/31/2017 - 16:43:22: [TF2ITEMS] ---------------------------------------
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iAttributeDefinitionIndex = 51
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> flValue = 100.000000
L 01/31/2017 - 16:43:22: [TF2ITEMS] ---------------------------------------
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iAttributeDefinitionIndex = 97
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> flValue = 0.950000
L 01/31/2017 - 16:43:22: [TF2ITEMS] ---------------------------------------
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iAttributeDefinitionIndex = 26
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> flValue = 75.000000
L 01/31/2017 - 16:43:22: [TF2ITEMS] ---------------------------------------
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> iAttributeDefinitionIndex = 275
L 01/31/2017 - 16:43:22: [TF2ITEMS] >>> flValue = 1.000000
L 01/31/2017 - 16:43:22: [TF2ITEMS] ---------------------------------------
L 01/31/2017 - 16:43:22: [SM] Exception reported: Item is NULL. File a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
L 01/31/2017 - 16:43:22: [SM] Blaming: overwatch.smx
L 01/31/2017 - 16:43:22: [SM] Call stack trace:
L 01/31/2017 - 16:43:22: [SM] [0] TF2Items_GiveNamedItem
L 01/31/2017 - 16:43:22: [SM] [1] Line 1421, C:\Users\Allotroprism\Desktop\플러그인 만들기\overwatch.sp::GiveWeapon
L 01/31/2017 - 16:43:22: [SM] [2] Line 1942, C:\Users\Allotroprism\Desktop\플러그인 만들기\overwatch.sp::OnPlayerRunCmd
L 01/31/2017 - 16:43:55: SourceMod error session started
L 01/31/2017 - 16:43:55: Info (map "pl_dorado") (file "errors_20170131.log")
L 01/31/2017 - 16:43:55: [CRASH] Accelerator uploaded crash dump: Crash ID: RRNT-I2DC-GAMX
PHP Code:
if(StrEqual(Champ, "McCree"))
{
new Handle:hItem = TF2Items_CreateItem(OVERRIDE_ALL);
DeleteWeapons(client, "0");
TF2Items_SetClassname(hItem, "tf_weapon_revolver");
TF2Items_SetItemIndex(hItem, 161);
TF2Items_SetNumAttributes(hItem, 5);
TF2Items_SetAttribute(hItem, 0, 2, 1.25);
TF2Items_SetAttribute(hItem, 1, 51, 100.0);
TF2Items_SetAttribute(hItem, 2, 97, 0.95);
TF2Items_SetAttribute(hItem, 3, 26, 75.0);
TF2Items_SetAttribute(hItem, 4, 275, 1.0);
int weapon = TF2Items_GiveNamedItem(client, hItem); // Line 1421
EquipPlayerWeapon(client, weapon);
}
PHP Code:
if(g_Champion[client] == 5)
{
if(!StrEqual(weap, "tf_weapon_revolver"))
{
if(PlayerCheck(client) && IsPlayerAlive(client))
{
GiveWeapon(client, "McCree"); // Line 1921
SetWeaponAmmo(client, 0, 999999);
}
}
if(g_McCreeOnRapid[client])
{
if(GetWeaponClip(client, 0) != 0)
{
buttons |= IN_ATTACK;
return Plugin_Changed;
} else {
g_McCreeOnRapid[client] = false;
GiveWeapon(client, "McCree");
SetWeaponClip(client, 0, 0);
}
}
}
And It Crash The server...
How to fix it?