View Single Post
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 02-16-2016 , 11:57   Re: [TF2] Getting CEconItemView
Reply With Quote #5

I got that to work, thanks! I have one last question and it's not related to CEconItemView.

Gamedata:

Spoiler


The below code triggers SetFailState:

PHP Code:
    // CTFPlayer::ReapplyItemUpgrades(CTFPlayer *this, CEconItemView *int)
    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetFromConf(hConfSDKConf_Virtual"CTFPlayer::ReapplyItemUpgrades");
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
    
FixUpgrades EndPrepSDKCall();
    if (
FixUpgrades == INVALID_HANDLE)
        
SetFailState("[FP] Call was aborted: Could not initialize call to CTFPlayer::ReapplyItemUpgrades. You need new gamedata."); 
The below code works perfectly fine:

PHP Code:
    // CTFPlayer::ReapplyItemUpgrades(CTFPlayer *this, CEconItemView *int)
    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetSignature(SDKLibrary_Server"\x55\x8B\xEC\x83\xEC\x0C\x57\x8B\xF9\x8B\x07\x8B\x80\xEC\x06\x00\x00"17);
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
    
FixUpgrades EndPrepSDKCall();
    if (
FixUpgrades == INVALID_HANDLE)
        
SetFailState("[FP] Call was aborted: Could not initialize call to CTFPlayer::ReapplyItemUpgrades. You need new gamedata."); 
Why does hard-coding the gamedata into the plugin work but reading from a config file fails? Either the signature is busted (I don't think so) or my keyvalue is somehow malformed.

Thanks!

Last edited by Potato Uno; 02-16-2016 at 11:58.
Potato Uno is offline