Raised This Month: $ Target: $400
 0% 

What is this?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spy123
BANNED
Join Date: Jul 2011
Location: Giurgiu / Romania
Old 05-06-2013 , 14:43   What is this?
Reply With Quote #1

L 05/06/2013 - 21:28:59: [ENGINE] Invalid player 0 (not in-game)
L 05/06/2013 - 21:28:59: [AMXX] Displaying debug trace (plugin "watf.amxx")
L 05/06/2013 - 21:28:59: [AMXX] Run time error 10: native error (native "entity_range")
L 05/06/2013 - 21:28:59: [AMXX] [0] float.inc::operator>(Float:,Float:) (line 138)
L 05/06/2013 - 21:28:59: [AMXX] [1] watf.sma::client_PreThink (line 3578)

In every second i've got this errors on console...

At the line 138 I have:
PHP Code:
#define AMOUNTAGI        "CANT_AGILIDAD_POR_LVL" 
and At the line 3578 I have:
PHP Code:
if(entity_range(idferencere) > maxdistance && entity_range(iddistancemax) > maxdistancem
Someone can explain me?

Last edited by Spy123; 05-06-2013 at 14:43.
Spy123 is offline
yan1255
Senior Member
Join Date: Jul 2011
Old 05-06-2013 , 15:55   Re: What is this?
Reply With Quote #2

i think for the
Quote:
L 05/06/2013 - 21:28:59: [ENGINE] Invalid player 0 (not in-game)
you should use
Quote:
if ( is_user_connected( index ) )
and explain what are you doing and give a little bigger examples of the plugin...
__________________
yan1255 is offline
YakumoHiratsuhi
Veteran Member
Join Date: Dec 2010
Location: Dreαmlαnd.
Old 05-06-2013 , 15:58   Re: What is this?
Reply With Quote #3

You get that many errors because you badcoded something in the recursive function client_prethink() you probably did something wrong when passing the parameters in that native, as far as i can see, you passed an invalid data type.

Would you mind posting your client_prethink() code?
__________________
"Podra parecer ridiculo o imposible, pero este es el camino que seguimos los verdaderos hombres, si hay un muro en el camino, lo derribamos, si no hay camino, haremos uno, con nuestras propias manos, porque el magma de nuestro corazón arde en llamas."

Last edited by YakumoHiratsuhi; 05-06-2013 at 15:59.
YakumoHiratsuhi is offline
Send a message via MSN to YakumoHiratsuhi
Spy123
BANNED
Join Date: Jul 2011
Location: Giurgiu / Romania
Old 05-07-2013 , 12:11   Re: What is this?
Reply With Quote #4

This is it:

PHP Code:
public client_PreThink(id)
{
    if( 
is_kickball && is_valid_ent(aball) && is_user_connected(id))
    {
        new 
button entity_get_int(idEV_INT_button)
        new 
relode = (button IN_RELOAD)
        new 
usekey = (button IN_USE)
        new 
up = (button IN_FORWARD)
        new 
down = (button IN_BACK)
        new 
moveright = (button IN_MOVERIGHT)
        new 
moveleft = (button IN_MOVELEFT)
        new 
jump = (button IN_JUMP)
        new 
flags entity_get_int(idEV_INT_flags)
        new 
onground flags FL_ONGROUND
        
if( (moveright || moveleft) && !up && !down && jump && onground && !g_sprint[id] && id != ballholder)
            
SideJump[id] = 1
        
        
if(!Coord_Off_Z_active)
        {
            if(
onground)
            {
                new 
User_Origin[3]
                
get_user_origin(idUser_Origin)
                
Coord_Off_Z_active 1
                Coord_Off_Z 
User_Origin[2] - 35
                Coord_Off_Y 
User_Origin[1]
            }
        }

        if(
ballholder 0)
        {
            
no_ball 1
            entity_set_float
(aball,EV_FL_framerate,0.0)
            
entity_set_int(aball,EV_INT_sequence,0)
        }
        else
        {
            if(
no_ball)
            {
                
no_ball 0
                entity_set_int
(aballEV_INT_sequence2);
                
entity_set_float(aballEV_FL_framerate22.0);
            }
        }

        
        
        if(
relode)
        {
            
        
entity_set_float(idEV_FL_framerate0.0);    //FLY CHARGE
        
entity_set_int(idEV_INT_sequence54);
        
entity_set_float(idEV_FL_animtime1.0)
        }



        if(
g_sprint[id])
            
entity_set_float(idEV_FL_fuser20.0)
            

        if( 
id != ballholder )
            
PressedAction[id] = usekey
        
else 
        {
            if( 
usekey && !PressedAction[id]) 
            {
                
kickBall(ballholder0)
                        
                if(
get_pcvar_num(CVAR_OFFSIDE))
                    
Adelantado(id)                    
            }
            else if( !
usekey && PressedAction[id])
                
PressedAction[id] = 0
        
}    
        
        if(
soy_spec[id] || is_user_foul[id] || is_offside[id])
        {
            if((
button IN_ATTACK || button IN_ATTACK2)) 
                
entity_set_int(idEV_INT_button, (button & ~IN_ATTACK) & ~IN_ATTACK2)
        }

/****************************************************************** FRAG O NO FRAG ************************************************************************/
        
new auxiliar get_pcvar_num(CVAR_FRAG)
        if(!
auxiliar)
        {
            if( 
id != ballholder && (button IN_ATTACK || button IN_ATTACK2) ) 
            {

/****************************************************************** FRAG EN AREA ************************************************************************/
            
                
static Float:maxdistance
                
static Float:maxdistancem
                
static ferencere
                
static distancemax

                
new fteam get_user_team(id)
            
                
distancemax Mascots[fteam]
                
maxdistancem get_pcvar_float(CVAR_KILLNEARAREA)
                
                if(
ballholder 0
                {
                    
ferencere ballholder
                    maxdistance 
get_pcvar_float(CVAR_KILLNEARHOLDER)
                }            
                else {
                    
ferencere aball
                    maxdistance 
get_pcvar_float(CVAR_KILLNEARBALL)
                }
                
                if(!
maxdistance)
                    return
                    
                if(
entity_range(idferencere) > maxdistance && entity_range(iddistancemax) > maxdistancem)
                    
entity_set_int(idEV_INT_button, (button & ~IN_ATTACK) & ~IN_ATTACK2)
            }
        }
    }


Last edited by Spy123; 05-07-2013 at 17:22.
Spy123 is offline
YakumoHiratsuhi
Veteran Member
Join Date: Dec 2010
Location: Dreαmlαnd.
Old 05-07-2013 , 15:07   Re: What is this?
Reply With Quote #5

Thanks for posting the function, here's what i figured out.
entity_range() returns the distance between two entities in a float datatype, i really don't know if this function checks if the two ents are valid, ignoring the player you should check if ferencere or distancemax entity is valid before doing anything.

PHP Code:
if(entity_range(idferencere) > maxdistance && entity_range(iddistancemax) > maxdistancem)
->
if(is_valid_ent(ferencere) && is_valid_ent(distancemax) && entity_range(idferencere) > maxdistance && entity_range(iddistancemax) > maxdistancem
not pretty sure since idk all the part of the global code that is used there.
__________________
"Podra parecer ridiculo o imposible, pero este es el camino que seguimos los verdaderos hombres, si hay un muro en el camino, lo derribamos, si no hay camino, haremos uno, con nuestras propias manos, porque el magma de nuestro corazón arde en llamas."

Last edited by YakumoHiratsuhi; 05-07-2013 at 15:10.
YakumoHiratsuhi is offline
Send a message via MSN to YakumoHiratsuhi
Spy123
BANNED
Join Date: Jul 2011
Location: Giurgiu / Romania
Old 05-08-2013 , 14:09   Re: What is this?
Reply With Quote #6

Didn't work i still get those errors
Spy123 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-08-2013 , 15:34   Re: What is this?
Reply With Quote #7

PHP Code:
public client_PreThink(id)
{
if( 
id == 0  ) return // i dont think that id can be here less than 0 and bigger than 32 so i think this should work

... old code continues 
.Dare Devil. is offline
YakumoHiratsuhi
Veteran Member
Join Date: Dec 2010
Location: Dreαmlαnd.
Old 05-08-2013 , 15:52   Re: What is this?
Reply With Quote #8

Quote:
Originally Posted by .Dare Devil. View Post
PHP Code:
public client_PreThink(id)
{
if( 
id == 0  ) return // i dont think that id can be here less than 0 and bigger than 32 so i think this should work

... old code continues 
I didn't know that the function could pass 0 as an id anyway, let him test.
__________________
"Podra parecer ridiculo o imposible, pero este es el camino que seguimos los verdaderos hombres, si hay un muro en el camino, lo derribamos, si no hay camino, haremos uno, con nuestras propias manos, porque el magma de nuestro corazón arde en llamas."

Last edited by YakumoHiratsuhi; 05-08-2013 at 15:53.
YakumoHiratsuhi is offline
Send a message via MSN to YakumoHiratsuhi
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-08-2013 , 15:57   Re: What is this?
Reply With Quote #9

Quote:
Originally Posted by YakumoHiratsuhi View Post
I didn't know that the function could pass 0 as an id anyway, let him test.
I was also surprised but as you can see, error logs tell us something else.
.Dare Devil. is offline
Spy123
BANNED
Join Date: Jul 2011
Location: Giurgiu / Romania
Old 05-10-2013 , 12:09   Re: What is this?
Reply With Quote #10

didn't work guys..i still get this errors:

L 05/10/2013 - 18:23:06: [ENGINE] Invalid player 0 (not in-game)
L 05/10/2013 - 18:23:06: [AMXX] Displaying debug trace (plugin "watf.amxx")
L 05/10/2013 - 18:23:06: [AMXX] Run time error 10: native error (native "entity_range")
L 05/10/2013 - 18:23:06: [AMXX] [0] float.inc::operator>(Float:,Float:) (line 138)
L 05/10/2013 - 18:23:06: [AMXX] [1] watff.sma::client_PreThink (line 3579)

Last edited by Spy123; 05-10-2013 at 12:09.
Spy123 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 10:48.


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