AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Callback-provided entity -1 for inflictor is invalid (https://forums.alliedmods.net/showthread.php?t=306363)

stickz 03-27-2018 19:43

Callback-provided entity -1 for inflictor is invalid
 
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.

nosoop 03-27-2018 20:48

Re: Callback-provided entity -1 for inflictor is invalid
 
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.

stickz 03-28-2018 12:12

Re: Callback-provided entity -1 for inflictor is invalid
 
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.


All times are GMT -4. The time now is 03:53.

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