Raised This Month: $51 Target: $400
 12% 

GetEntProp errors :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-12-2014 , 20:41   GetEntProp errors :(
Reply With Quote #1

Code:
Spoiler


Errors:
Spoiler


I've tried tossing in validation checks here and there, but nothing has resolved these two errors. I'm completely lost.

As for why I'm not using m_hActiveWeapon, I did use that at one point, but it resulted in errors when trying to track certain kills where players could quickly switch their weapons.

Last edited by 404UserNotFound; 01-16-2014 at 15:41.
404UserNotFound is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 01-13-2014 , 05:58   Re: GetEntProp errors :(
Reply With Quote #2

Your code gave me cancer
Spoiler
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot

Last edited by Root_; 01-13-2014 at 06:08.
Root_ is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-13-2014 , 09:54   Re: GetEntProp errors :(
Reply With Quote #3

Quote:
Originally Posted by Root_ View Post
Your code gave me cancer
Thanks for the fixes, but Secondary was used for the bleed_cleaver, as the Flying Guillotine is a secondary weapon. It's ok though, it's easy to miss

You've also assumed correct for everything in your commenting.

Side note: player_penetrationhs is a custom logname for the player_penetration event, with the headshot custom-kill (bodyshot player 1, headshot player 2)

So I fixed up the secondary/secondaryID thing, added in primary/primaryID for the custom headshot tracking, fixed the indentation errors that resulted from the copy/pasting of your code, and compiled it. No compile errors

FYI, here's how I did the re-introducing of the secondary stuff that is required for the Flying Guillotine bleed kills:

Spoiler

Last edited by 404UserNotFound; 01-13-2014 at 11:52.
404UserNotFound is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-13-2014 , 16:33   Re: GetEntProp errors :(
Reply With Quote #4

Ok I have a bit of an issue. For some reason the plugin with the changes posted by Root_ is causing the killfeed to disappear completely.

Not sure what's causing it though.
404UserNotFound is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 01-13-2014 , 16:57   Re: GetEntProp errors :(
Reply With Quote #5

I think you should remove return Plugin_Changed and Plugin_Continue.
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-13-2014 , 17:22   Re: GetEntProp errors :(
Reply With Quote #6

Quote:
Originally Posted by Root_ View Post
I think you should remove return Plugin_Changed and Plugin_Continue.
Fixed the issue! Thanks Root_, have some bacon!
404UserNotFound is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-16-2014 , 15:40   Re: GetEntProp errors :(
Reply With Quote #7

Got a new error pertaining to the "broken" bottle check:

Code:
L 01/15/2014 - 11:05:03: [SM] Native "GetEntProp" reported: Property "m_bBroken" not found (entity 1/player)
L 01/15/2014 - 11:05:03: [SM] Displaying call stack trace for plugin "hlstatstracking.smx":
L 01/15/2014 - 11:05:03: [SM]   [0]  Line 90, C:\Coding\addons\sourcemod\scripting\hlstatstracking.sp::Event_PlayerDeath()
404UserNotFound is offline
arthurdead
Senior Member
Join Date: Jul 2013
Old 01-16-2014 , 15:47   Re: GetEntProp errors :(
Reply With Quote #8

Quote:
Originally Posted by abrandnewday View Post
Got a new error pertaining to the "broken" bottle check:

Code:
L 01/15/2014 - 11:05:03: [SM] Native "GetEntProp" reported: Property "m_bBroken" not found (entity 1/player)
L 01/15/2014 - 11:05:03: [SM] Displaying call stack trace for plugin "hlstatstracking.smx":
L 01/15/2014 - 11:05:03: [SM]   [0]  Line 90, C:\Coding\addons\sourcemod\scripting\hlstatstracking.sp::Event_PlayerDeath()
isn't m_bBroken on weapon ?
arthurdead is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-16-2014 , 17:25   Re: GetEntProp errors :(
Reply With Quote #9

Quote:
Originally Posted by arthurdead View Post
isn't m_bBroken on weapon ?
Yeah;

PHP Code:
if (<= attacker <= MaxClients)
{
    new 
melee GetPlayerWeaponSlot(attackerTFWeaponSlot_Melee);
    if (
IsValidEdict(melee))
    {
        
meleeID GetEntProp(meleeProp_Send"m_iItemDefinitionIndex");
    }

    new 
secondary GetPlayerWeaponSlot(attackerTFWeaponSlot_Secondary);
    if (
IsValidEdict(secondary))
    {
        
secondaryID GetEntProp(secondaryProp_Send"m_iItemDefinitionIndex");
    }
        
    new 
primary GetPlayerWeaponSlot(attackerTFWeaponSlot_Primary);
    if (
IsValidEdict(primary))
    {
        
primaryID GetEntProp(primaryProp_Send"m_iItemDefinitionIndex");
    }
}

if (
strcmp(weapon"bottle"false) == 0)
{
    
SetEventString(event"weapon_logclassname"GetEntProp(meleeIDProp_Send"m_bBroken") ? "bottle_broken" "bottle_unbroken");

It's for my custom check to see if the Demoman's bottle was broken or not broken when he kills a player, so that HLStats can track both kills independently.

Last edited by 404UserNotFound; 01-16-2014 at 17:26.
404UserNotFound is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 01-16-2014 , 17:29   Re: GetEntProp errors :(
Reply With Quote #10

Code:
SetEventString(event, "weapon_logclassname", GetEntProp(melee, Prop_Send, "m_bBroken") ? "bottle_broken" : "bottle_unbroken");
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ 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 17:54.


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