This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float) [!ws !knife !nametag]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
szogun
Senior Member
Join Date: Apr 2016
Plugin ID:
5669
Plugin Version:
1.7.7
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Unapprover:
    Reason for Unapproving:
    https://www.mail-archive.com/[email protected]/msg11235.html
    Old 06-24-2017 , 06:26   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
    Reply With Quote #1

    Code:
    L 06/24/2017 - 12:28:44: [SM] Exception reported: Menu handle 0 is invalid (error 4)
    L 06/24/2017 - 12:28:44: [SM] Blaming: weapons.smx
    L 06/24/2017 - 12:28:44: [SM] Call stack trace:
    L 06/24/2017 - 12:28:44: [SM]   [0] Menu.AddItem
    L 06/24/2017 - 12:28:44: [SM]   [1] Line 66, weapons/config.sp::ReadConfig
    L 06/24/2017 - 12:28:44: [SM]   [2] Line 85, weapons.sp::OnConfigsExecuted
    Code:
    L 06/24/2017 - 12:25:09: [SM] Exception reported: Menu handle 0 is invalid (error 4)
    L 06/24/2017 - 12:25:09: [SM] Blaming: weapons.smx
    L 06/24/2017 - 12:25:09: [SM] Call stack trace:
    L 06/24/2017 - 12:25:09: [SM]   [0] Menu.Display
    L 06/24/2017 - 12:25:09: [SM]   [1] Line 87, weapons/menus.sp::WeaponMenuHandler

    Last edited by szogun; 06-24-2017 at 06:29.
    szogun is offline
    kgns
    Senior Member
    Join Date: May 2017
    Location: Istanbul, Turkey
    Old 06-24-2017 , 08:51   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
    Reply With Quote #2

    Quote:
    Originally Posted by szogun View Post
    Code:
    L 06/24/2017 - 12:28:44: [SM] Exception reported: Menu handle 0 is invalid (error 4)
    L 06/24/2017 - 12:28:44: [SM] Blaming: weapons.smx
    L 06/24/2017 - 12:28:44: [SM] Call stack trace:
    L 06/24/2017 - 12:28:44: [SM]   [0] Menu.AddItem
    L 06/24/2017 - 12:28:44: [SM]   [1] Line 66, weapons/config.sp::ReadConfig
    L 06/24/2017 - 12:28:44: [SM]   [2] Line 85, weapons.sp::OnConfigsExecuted
    Code:
    L 06/24/2017 - 12:25:09: [SM] Exception reported: Menu handle 0 is invalid (error 4)
    L 06/24/2017 - 12:25:09: [SM] Blaming: weapons.smx
    L 06/24/2017 - 12:25:09: [SM] Call stack trace:
    L 06/24/2017 - 12:25:09: [SM]   [0] Menu.Display
    L 06/24/2017 - 12:25:09: [SM]   [1] Line 87, weapons/menus.sp::WeaponMenuHandler
    you have edited the source code;

    Code:
    L 06/24/2017 - 12:28:44: [SM]   [2] Line 85, weapons.sp::OnConfigsExecuted
    should be line 84 not 85

    and the error you get cannot happen with the untouched release, because there is a:
    Code:
    menuWeapons[langCounter][k] = new Menu(WeaponsMenuHandler, MENU_ACTIONS_DEFAULT|MenuAction_DisplayItem);
    right before the lines you get the error from. so menu handle will never be invalid unless you are getting oom or something.

    use the plugin without modifying the code and test it again
    kgns is offline
    szogun
    Senior Member
    Join Date: Apr 2016
    Old 06-24-2017 , 10:40   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
    Reply With Quote #3

    Quote:
    Originally Posted by kgns View Post
    you have edited the source code;

    Code:
    L 06/24/2017 - 12:28:44: [SM]   [2] Line 85, weapons.sp::OnConfigsExecuted
    should be line 84 not 85

    and the error you get cannot happen with the untouched release, because there is a:
    Code:
    menuWeapons[langCounter][k] = new Menu(WeaponsMenuHandler, MENU_ACTIONS_DEFAULT|MenuAction_DisplayItem);
    right before the lines you get the error from. so menu handle will never be invalid unless you are getting oom or something.

    use the plugin without modifying the code and test it again
    Only what I changed
    PHP Code:
        RegConsoleCmd("buyammo1"CommandWeaponSkins);
        
    RegConsoleCmd("sm_ws"CommandWeaponSkins);
        
    RegConsoleCmd("sm_skin"CommandWeaponSkins);
        
    RegConsoleCmd("sm_skins"CommandWeaponSkins);
        
    RegConsoleCmd("buyammo2"CommandKnife);
        
    RegConsoleCmd("sm_knife"CommandKnife);
        
    RegConsoleCmd("sm_nametag"CommandNameTag);
        
    RegConsoleCmd("sm_wslang"CommandWSLang);
        
    //RegConsoleCmd("sm_reportdata", CommandReportData); 
    szogun is offline
    kgns
    Senior Member
    Join Date: May 2017
    Location: Istanbul, Turkey
    Old 06-25-2017 , 10:52   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
    Reply With Quote #4

    Quote:
    Originally Posted by Sw33T3R View Post
    kgns
    Can you fix it?
    BTW where can i change minimal float value?
    0.00000001 is better than 0.0
    Plugins
    Spoiler



    Code:
    public int FloatMenuHandler(Menu menu, MenuAction action, int client, int selection)
    {
    	switch(action)
    	{
    		case MenuAction_Select:
    		{
    			if(IsClientInGame(client))
    			{
    				char buffer[30];
    				menu.GetItem(selection, buffer, sizeof(buffer));
    				if(StrEqual(buffer, "increase"))
    				{
    					g_fFloatValue[client][g_iIndex[client]] = g_fFloatValue[client][g_iIndex[client]] - g_fFloatIncrementSize;
    					if(g_fFloatValue[client][g_iIndex[client]] < 0.0)
    					{
    						g_fFloatValue[client][g_iIndex[client]] = 0.0; <--- This is minimal float value?
    					}
    PHP Code:
    SetEntPropFloat(entityProp_Send"m_flFallbackWear"g_iEnableFloat == || g_fFloatValue[client][index] == 0.0 0.000001 g_fFloatValue[client][index] == 1.0 0.999999 g_fFloatValue[client][index]); 
    this line of code, makes sure the float is never set as 0.0 or 1.0. so it should be working without a problem.

    did you recompile the source code yourself? if you did can you tell me what the sourcemod compiler version you see is when you compile it?

    Quote:
    Originally Posted by szogun View Post
    Only what I changed
    PHP Code:
        RegConsoleCmd("buyammo1"CommandWeaponSkins);
        
    RegConsoleCmd("sm_ws"CommandWeaponSkins);
        
    RegConsoleCmd("sm_skin"CommandWeaponSkins);
        
    RegConsoleCmd("sm_skins"CommandWeaponSkins);
        
    RegConsoleCmd("buyammo2"CommandKnife);
        
    RegConsoleCmd("sm_knife"CommandKnife);
        
    RegConsoleCmd("sm_nametag"CommandNameTag);
        
    RegConsoleCmd("sm_wslang"CommandWSLang);
        
    //RegConsoleCmd("sm_reportdata", CommandReportData); 
    can you tell me what the sourcemod compiler version you see is when you compile it? another forum user PMed me with the same error, and he said its working if he uses the compiled smx from github, but he gets the error if he himself compiles the code. it might be due to the version of the compiler, because it is an absurd error not everyone gets (certainly i don't).
    kgns is offline
    kgns
    Senior Member
    Join Date: May 2017
    Location: Istanbul, Turkey
    Old 06-25-2017 , 13:17   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
    Reply With Quote #5

    Quote:
    Originally Posted by kgns View Post
    can you tell me what the sourcemod compiler version you see is when you compile it? another forum user PMed me with the same error, and he said its working if he uses the compiled smx from github, but he gets the error if he himself compiles the code. it might be due to the version of the compiler, because it is an absurd error not everyone gets (certainly i don't).
    user who contacted me thru PM told me his SourcePawn Compiler's version was 1.7.3-dev+5280. this is probably the case, use the latest version of the compiler, or any 1.8.x version. there's no bug in that piece of code.
    kgns is offline
    szogun
    Senior Member
    Join Date: Apr 2016
    Old 06-25-2017 , 16:39   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
    Reply With Quote #6

    Quote:
    Originally Posted by kgns View Post
    PHP Code:
    SetEntPropFloat(entityProp_Send"m_flFallbackWear"g_iEnableFloat == || g_fFloatValue[client][index] == 0.0 0.000001 g_fFloatValue[client][index] == 1.0 0.999999 g_fFloatValue[client][index]); 
    this line of code, makes sure the float is never set as 0.0 or 1.0. so it should be working without a problem.

    did you recompile the source code yourself? if you did can you tell me what the sourcemod compiler version you see is when you compile it?



    can you tell me what the sourcemod compiler version you see is when you compile it? another forum user PMed me with the same error, and he said its working if he uses the compiled smx from github, but he gets the error if he himself compiles the code. it might be due to the version of the compiler, because it is an absurd error not everyone gets (certainly i don't).
    sm compiled 1.8 - Exactly which version I can not tell you because I have been using it for a long time
    szogun is offline
    kgns
    Senior Member
    Join Date: May 2017
    Location: Istanbul, Turkey
    Old 06-25-2017 , 17:46   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
    Reply With Quote #7

    Quote:
    Originally Posted by szogun View Post
    sm compiled 1.8 - Exactly which version I can not tell you because I have been using it for a long time
    my compiler version is SourcePawn Compiler 1.8.0.5981 and since the stock .smx file from the repository works without errors, and the one you modify and compile doesn't work, that is your problem to solve. all i can do is to give you possible reasons. and other than that nothing comes to my mind, you need to solve this on your own.
    kgns is offline
    erky
    New Member
    Join Date: Sep 2022
    Old 09-25-2022 , 07:51   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float) [!ws !knife !name
    Reply With Quote #8

    When I join the server and type !ws and choose a skin I get an error.
    Also the skin doesn't change.

    Code:
    [SM] Blaming: weapons.smx
    [SM] Call stack trace:
    [SM]   [0] SetEntProp
    [SM]   [1] Line 257, tmp/addons/sourcemod/scripting/weapons.sp::SetWeaponProps
    [SM]   [2] Line 55, tmp/addons/sourcemod/scripting/weapons/hooks.sp::GiveNamedItemPost
    [SM]   [4] GivePlayerItem
    [SM]   [5] Line 336, tmp/addons/sourcemod/scripting/weapons.sp::RefreshWeapon
    [SM]   [6] Line 39, tmp/addons/sourcemod/scripting/weapons/menus.sp::WeaponsMenuHandler
    I tried reinstalling this plugin and PTaH but it didn't work.
    erky 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 18:58.


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