Raised This Month: $32 Target: $400
 8% 

Callback-provided entity -1 for inflictor is invalid


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stickz
Senior Member
Join Date: Oct 2012
Location: Ontario, Canada
Old 03-27-2018 , 19:43   Callback-provided entity -1 for inflictor is invalid
Reply With Quote #1

I've been getting this error for a while now. I can't figure out what it means and why it's happening.
Code:
L 03/25/2018 - 20:09:29: [SM] Exception reported: Callback-provided entity -1 for inflictor is invalid
L 03/25/2018 - 20:09:29: [SM] Blaming: nd_damage_mult.smx::ND_OnBunkerDamaged
My source-code to the plugin is located here. Any help would be greatly appreciated.

Last edited by stickz; 03-27-2018 at 19:43.
stickz is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 03-27-2018 , 20:48   Re: Callback-provided entity -1 for inflictor is invalid
Reply With Quote #2

According to the SDKHooks extension source, the inflictor is checked to be a valid entity when you return Plugin_Changed from the callback.

You can try assigning 0 (worldspawn) or the victim itself to the ND_OnBunkerDamaged's inflictor argument.

If -1 does have significance as a value, or if there should be an inflictor (and SDKHooks is supported for the game), file a bug on it.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
stickz
Senior Member
Join Date: Oct 2012
Location: Ontario, Canada
Old 03-28-2018 , 12:12   Re: Callback-provided entity -1 for inflictor is invalid
Reply With Quote #3

Nuclear Dawn has game sdk hooks support. It's highly possible that the inflictor is actually invalid when it's trying to change the damage dealt. I opted to return Plugin_Continue if the inflictor is invalid. The round is over anyways and inflicting damage isn't required.

Swapping the inflictor could break things because other events might not register properly. The inflictor is the weapon that is used to damage the bunker entity. The inflictor and possibly the attacker becomes invalid an the end of the round or maybe anther event.

Last edited by stickz; 03-28-2018 at 12:17.
stickz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode