Raised This Month: $ Target: $400
 0% 

PM Got a NaN velocity 1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-05-2016 , 17:31   PM Got a NaN velocity 1
Reply With Quote #1

When i use the wallhang i get a spam with 10 or more messages per second with those words:
Code:
PM  Got a NaN velocity 1
When i stop use the wallhang, this message stop show. I've searched about this error but nothing with Wallhang, is just when I use the wallhang. Idk why

Wallhang format:
PHP Code:
public plugin_init()
{
    
RegisterHamHam_Player_PostThink"player""ham_Player_PostThink_Post");
    
RegisterHamHam_Player_Jump"player""ham_Player_Jump_Pre");
    
RegisterHamHam_Touch"func_wall""ham_Touch_Pre");
    
RegisterHamHam_Touch"func_breakable""ham_Touch_Pre");
    
RegisterHamHam_Touch"worldspawn""ham_Touch_Pre");
}

public 
ham_Player_PostThink_Postid )
{
    if( !
IsPlayerid ) )
        return 
HAM_IGNORED;
        
    if( 
SetWallHangid ] && g_bHangedid ] )
    {
        
engfuncEngFunc_SetSizeidg_fVecMinsid ], g_fVecMaxsid ] );
        
engfuncEngFunc_SetOriginidg_fVecOriginid ] );
        
set_pevidpev_velocity);
        
set_pdata_floatidm_flNextAttack1.0XTRA_OFS_PLAYER );
    }
    
    return 
HAM_IGNORED;
}

public 
ham_Player_Jump_Preid )
{
    static 
afButtonPressedafButtonPressed get_pdata_intidm_afButtonPressed );
    
    if( 
g_iRoundEnd == || !SetWallHangid ] || !g_bHangedid ] || !g_bIsAliveid ] )
    {
        return 
HAM_IGNORED;
    }
    
    if( ( 
pevidpev_flags ) & FL_WATERJUMP ) || pevidpev_waterlevel ) >= )
    {
        return 
HAM_IGNORED;
    }
    
    if( ~
afButtonPressed IN_JUMP )
    {
        return 
HAM_IGNORED;
    }
    
    
g_bHangedid ] = false;
    
    new 
Float:fVecVelocity];
    
    
velocity_by_aimid600fVecVelocity );
    
set_pevidpev_velocityfVecVelocity );
    
set_user_velocityidfVecVelocity );
    
    
set_pdata_intidm_ActivityACT_HOP );
    
set_pdata_intidm_IdealActivityACT_HOP );
    
set_pevidpev_gaitsequencePLAYER_JUMP );
    
set_pevidpev_frame0.0 );
    
set_pdata_intidm_afButtonPressedafButtonPressed & ~IN_JUMP );
    
    return 
HAM_SUPERCEDE;
}

public 
ham_Touch_PreiEntid )
{
    if( 
g_iRoundEnd == 0
    
&& IsPlayerid )
    && 
SetWallHangid ]
    && !
g_bHangedid ]
    && 
g_bIsAliveid ]
    && 
pevidpev_button ) & IN_USE
    
&& ~(pevidpev_flags ) & FL_ONGROUND ) )
    {
        
g_bHangedid ] = true;
        
pevidpev_minsg_fVecMinsid ] );
        
pevidpev_maxsg_fVecMaxsid ] );
        
pevidpev_origing_fVecOriginid ] );
    }

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 10-05-2016 at 17:38.
EFFx is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-05-2016 , 17:57   Re: PM Got a NaN velocity 1
Reply With Quote #2

developer 0 in console
__________________
Depresie is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-05-2016 , 18:01   Re: PM Got a NaN velocity 1
Reply With Quote #3

lmao... My developer is already 0.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-05-2016 , 18:13   Re: PM Got a NaN velocity 1
Reply With Quote #4

Well, shit...

Where you get this message? console? chat?
__________________
Depresie is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-05-2016 , 18:21   Re: PM Got a NaN velocity 1
Reply With Quote #5

In the console, is a spam, when i use the wallhang i get 10 or more messages per second, when i'm not using wallhang anymore, this message stop show.

But 5-6 trying use wallhang more, the server crash.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 10-07-2016 , 21:44   Re: PM Got a NaN velocity 1
Reply With Quote #6

ok, which is the purpose of the above plugins? What it should do?
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-07-2016 , 22:38   Re: PM Got a NaN velocity 1
Reply With Quote #7

This plugin is wallhang. Allow the players to arrest on the wall. Press E for arrest and space to get out/walk from the wall.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 10-07-2016 , 23:16   Re: PM Got a NaN velocity 1
Reply With Quote #8

Just founded this thread, maybe will help you: https://forums.alliedmods.net/showthread.php?t=190098
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-07-2016 , 23:48   Re: PM Got a NaN velocity 1
Reply With Quote #9

I understand his problem, but where this can be on my code? What should be changed?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 10-07-2016 at 23:48.
EFFx is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 10-08-2016 , 04:50   Re: PM Got a NaN velocity 1
Reply With Quote #10

Quote:
set_pev( id, pev_velocity, 0 );

Velocity is a vector - Float:{0.0,0.0,0.0}

Also I am not sure whether you can change players size like that. Probably it's not working at all.

Edit. Also you can safely move this
Code:
static afButtonPressed; afButtonPressed = get_pdata_int( id, m_afButtonPressed );

There's no need of getting players buttons, before all those checks.
__________________


Last edited by NiHiLaNTh; 10-08-2016 at 04:52.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
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 07:49.


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