CSendProp pretty much broken - doesn't find any props.

Please post any questions about developing your plugin here. Please use the search function before posting!
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

CSendProp pretty much broken - doesn't find any props.

Postby Omega_K2 » Wed Aug 14, 2013 6:49 am

It seems CSendProp is broken. It doesn't find any property anymore, not even the most basic properties like

CBaseEntity.m_vecOrigin
CBasePlayer.m_iHealth

etc.

Btw, I suggest the message output function is changed somehow, right now it only shows the error messages if you put "developer 1" in console. Would be cool if it could throw an python exception instead, so you can actually tell where the error is coming from.

Edit: TestCase

Syntax: Select all

def Test(av):
p = av['playerinfo']
e = p.get_edict()
prop = e.get_prop('CBasePlayer.m_iHealth')
print(prop.get_int())

import k2tools.cmdlib

def load():
k2tools.cmdlib.AdvancedCommandManager.register('test',
callback=(Test,),
log_pre_exec=True,
log_post_exec=True,
log_spam_protect=True,
server=True,
console=True,
)

def unload():
k2tools.cmdlib.AdvancedCommandManager.unregister('test')
Libraries: k2tools
Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)
Plugins (game-specific): None atm

If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Wed Aug 14, 2013 9:06 am

Remove the "CBasePlayer." part. This SendProp implementation does not require a full property path.
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Thu Aug 15, 2013 1:26 am

Ayuto wrote:Remove the "CBasePlayer." part. This SendProp implementation does not require a full property path.


Ah, I never realized this was changed at all. Much smarter to be honest this way.

Edit: Seems like many of the data files are in need of updating now, they still contain the old values.
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 41 guests