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

[DEV] *DEAD* TF2ItemsInfo v1.8.17.7 (21 Nov 2013)


Post New Thread Reply   
 
Thread Tools Display Modes
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 05-17-2012 , 13:41   Re: [DEV] TF2 Item Info v1.8 (15.05.12)
Reply With Quote #11

I know that
but
eh
too hard
meaning
for example
Code:
for( new key = 0; key < sizeof(TFClassType); key++ )
{
    // do something
}
is there something else to fix?

Last edited by Leonardo; 05-17-2012 at 13:50.
Leonardo is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-17-2012 , 14:39   Re: [DEV] TF2 Item Info v1.8 (15.05.12)
Reply With Quote #12

Quote:
Originally Posted by Leonardo View Post
I know that
but
eh
too hard
meaning
for example
Code:
for( new key = 0; key < sizeof(TFClassType); key++ )
{
    // do something
}
is there something else to fix?
Does this work?
PHP Code:
for (new key 0key _:TFClassTypekey++)
{
    
// do something

I know it compiles without errors, but I can't actually test it at the moment (I'm still at work).
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 05-17-2012 , 14:59   Re: [DEV] TF2 Item Info v1.7.3 (17.05.12)
Reply With Quote #13

_:TFClassType == 10
D:
oh shi-
Leonardo is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 05-17-2012 , 21:13   Re: [DEV] TF2 Item Info v1.7.3 (17.05.12)
Reply With Quote #14

That's how enums seem to work, yes. The enum's 'tag' ends up being the size of the enum.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 05-31-2012 , 05:33   Re: [DEV] TF2 Items Info v1.7.4 (29.05.12)
Reply With Quote #15

I require assistance!
I'm tired that it still unloads with MEMORY LEAK error =\
handles dump
and there're only 2 places with array return: Native_FindItemsIDsByCond and Native_GetItemEquipRegions.
__________________

Last edited by Leonardo; 05-31-2012 at 05:34.
Leonardo is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 05-31-2012 , 19:46   Re: [DEV] TF2 Items Info v1.7.4 (29.05.12)
Reply With Quote #16

Does botweprand close those handles properly?

EDIT: Line 781 in BotWepRand's "FinallyGiveItem()",
Code:
    new Handle:hItemEquipRegions = TF2II_GetItemEquipRegions( iItemDefID );
The handle is never closed after that.
Suggested fix:
Code:
    new Handle:hItemEquipRegions = TF2II_GetItemEquipRegions( iItemDefID );
    if( hEquipRegions[iClient] != INVALID_HANDLE && hItemEquipRegions != INVALID_HANDLE )
        for( new i = 0; i < GetArraySize( hItemEquipRegions ); i++ )
        {
            GetArrayString( hItemEquipRegions, i, strEquipRegion, sizeof(strEquipRegion) );
            PushArrayString( hEquipRegions[iClient], strEquipRegion );
        }
    if (hItemEquipRegions != INVALID_HANDLE)
    {
           CloseHandle(hItemEquipRegions);
    }
You don't need to set it to INVALID_HANDLE; since it's a local variable.

You closed it properly in GiveNamedItem(), though.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 05-31-2012 at 21:32.
FlaminSarge is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 06-02-2012 , 03:37   Re: [DEV] TF2 Items Info v1.7.4 (29.05.12)
Reply With Quote #17

What!!
I can't believe I missed that.

EDIT:
lol
still getting this error

Last edited by Leonardo; 09-14-2012 at 02:52.
Leonardo is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 06-02-2012 , 20:45   Re: [DEV] TF2 Items Info v1.7.4 (29.05.12)
Reply With Quote #18

Not a CellArray, but I don't see where hItemSchema is closed in PrecacheItemSchema()? Nor is hItemConfig closed if !FileExists( strFilePath ) under ReloadConfigs()
Also, I'm trying a CloneHandle fix.

EDIT: Here, take a look at this. Note, it DOES NOT FIX hItemSchema and hItemConfig bugs that I pointed out just now.
EDIT2: Now it fixes both of those as well.
Attached Files
File Type: sp Get Plugin or Get Source (tf2itemsinfo.sp - 168 views - 39.1 KB)
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 06-02-2012 at 20:58.
FlaminSarge is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 06-03-2012 , 12:10   Re: [DEV] TF2 Items Info v1.7.4 (29.05.12)
Reply With Quote #19

Quote:
Originally Posted by FlaminSarge View Post
Also, I'm trying a CloneHandle fix.
thing! forgot about second param of CloneHandle().
anyways, amazing. how I missed those things. god, I'm so retarded :c
Leonardo is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 06-05-2012 , 21:07   Re: [DEV] TF2 Items Info v1.7.6 (05.06.12)
Reply With Quote #20

Code:
            PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "EquipWearable");
            PrepSDKCall_AddParameter(SDKType_CBaseEntity, SDKPass_Pointer);
            hSDKEquipWearable = EndPrepSDKCall();
            if( hSDKEquipWearable == INVALID_HANDLE )
            {
                StartPrepSDKCall(SDKCall_Player);
                PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "EquipWearable");
Uh-oh!
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
Reply


Thread Tools
Display Modes

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 11:59.


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