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

[Ayuda] PreThink Error


  
 
 
Thread Tools Display Modes
Author Message
Axe-L
Senior Member
Join Date: Jan 2010
Location: Tucumán
Old 07-31-2012 , 21:24   [Ayuda] PreThink Error
#1

Hola que tal gente me doy una vueltita ya que preciso su ayuda, en mi zp tengo este error cunado lo pongo en modo debug

Quote:
[AMXX] Run time error 4: index out of bounds
L 07/31/2012 - 22:21:50: [AMXX] [0] uqz_gaming_zp_2.sma::fw_PlayerPreThink (line 3246)
Busco dicha linea y me lleva a este codigo


PHP Code:
// Forward Player PreThink
public fw_PlayerPreThink(id)
{    
    
// Not alive
    
if (!is_user_alive(id))
        return;
    
    
// Silent footsteps for zombies?
    
if (g_zombie[id] && !g_nemesis[id])
        
set_pev(idpev_flTimeStepSound999)
    
    
// Set Player MaxSpeed
    
if (g_frozen[id])
    {
        
set_pev(idpev_velocityFloat:{0.0,0.0,0.0}) // stop motion
        
set_user_maxspeed(id1.0// prevent from moving
    
}
    else if (!
g_freezetime)
    {
        if (
g_zombie[id])
        {
            if (
g_nemesis[id])
                
set_user_maxspeed(id265.0)
            else if (
g_assasin[id])
                
set_user_maxspeed(id800.0)
            else
                
set_user_maxspeed(idfloat(g_zclass_spd[g_zombieclass[id]]) + FZ_SPEED[id])
        }
        else
        {
            if (
g_survivor[id])
                
set_user_maxspeed(id250.0)
            else
                
set_user_maxspeed(idfloat(g_hclass_spd[g_humanclass[id]]) + FH_SPEED[id])
            
            if (
g_raptor[id])
            {    
                if(
g_estads[id])
                    
set_user_maxspeed(idget_user_maxspeed(id) + random_float(75.0150.0))
                else
                    
set_user_maxspeed(id300.0)
            }
        }
    } 
la linea donde esta el error es esta.

PHP Code:
set_user_maxspeed(idfloat(g_hclass_spd[g_humanclass[id]]) + FH_SPEED[id]) 
Alguno tiene alguna idea de como puedo arreglarlo? es un error que sale constate en la consola del servidor. Gracias
Axe-L is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 07-31-2012 , 21:34   Re: [Ayuda] PreThink Error
#2

pasas el limite de la variable: g_hclass_spd
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
LA_BANDA
BANNED
Join Date: Jun 2012
Location: Santiago
Old 08-01-2012 , 01:32   Re: [Ayuda] PreThink Error
#3

PHP Code:
    set_pev(idpev_maxspeedfloat(g_hclass_spd[g_humanclass[id]])) 
yo tengo asi nose si tiene algo que ver :/
LA_BANDA is offline
Send a message via MSN to LA_BANDA
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 08-01-2012 , 01:38   Re: [Ayuda] PreThink Error
#4

no tiene nada que ver lo que pasa que con la variable g_humanclass pasan el limite de g_hclass_spd
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
 



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 00:32.


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