AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float) [!ws !knife !nametag] (https://forums.alliedmods.net/showthread.php?t=298770)

szogun 06-24-2017 07:26

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
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


kgns 06-24-2017 09:51

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
Quote:

Originally Posted by szogun (Post 2531290)
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

Sw33T3R 06-24-2017 10:05

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
kgns
Can you fix it?
BTW where can i change minimal float value?
0.00000001 is better than 0.0
http://i.imgur.com/7tQ5SWa.png
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?
                                        }


szogun 06-24-2017 11:40

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
Quote:

Originally Posted by kgns (Post 2531315)
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); 


kgns 06-25-2017 11:52

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
Quote:

Originally Posted by Sw33T3R (Post 2531317)
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 (Post 2531335)
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 06-25-2017 14:17

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
Quote:

Originally Posted by kgns (Post 2531622)
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 06-25-2017 14:35

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
added Russian translation thanks to Reswero, check first post, new version 1.0.4 (just for Russian translation, if you don't need it, you don't have to upgrade over 1.0.3)

Czar_ 06-25-2017 16:07

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
Any way to change the seed of skins?

kgns 06-25-2017 17:08

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
you mean specifying the seed skin by skin instead of random?

szogun 06-25-2017 17:39

Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float management)
 
Quote:

Originally Posted by kgns (Post 2531622)
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


All times are GMT -4. The time now is 03:16.

Powered by vBulletin®
Copyright ©2000 - 2023, vBulletin Solutions, Inc.